X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fv8%2Ftest%2Fcctest%2Ftest-api.cc;h=7fc80b3a914ca823e88d642ec4e01ee7e8e130c6;hb=490a4587e7e356282cb1453efaf36de4acc9762f;hp=d1f25def57ad3eedf0906bbae0c3c7e7401ccd64;hpb=3a51af92707b9c600d06a404c9db8f07fcd50959;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/v8/test/cctest/test-api.cc b/src/v8/test/cctest/test-api.cc index d1f25de..7fc80b3 100644 --- a/src/v8/test/cctest/test-api.cc +++ b/src/v8/test/cctest/test-api.cc @@ -19545,15 +19545,15 @@ class InitDefaultIsolateThread : public v8::internal::Thread { break; case SetCounterFunction: - v8::V8::SetCounterFunction(NULL); + CcTest::isolate()->SetCounterFunction(NULL); break; case SetCreateHistogramFunction: - v8::V8::SetCreateHistogramFunction(NULL); + CcTest::isolate()->SetCreateHistogramFunction(NULL); break; case SetAddHistogramSampleFunction: - v8::V8::SetAddHistogramSampleFunction(NULL); + CcTest::isolate()->SetAddHistogramSampleFunction(NULL); break; } isolate->Exit(); @@ -20904,6 +20904,7 @@ TEST(RunMicrotasksWithoutEnteringContext) { } +#ifdef DEBUG static int probes_counter = 0; static int misses_counter = 0; static int updates_counter = 0; @@ -20933,11 +20934,10 @@ static const char* kMegamorphicTestProgram = " fooify(a);" " fooify(b);" "}"; +#endif static void StubCacheHelper(bool primary) { - V8::SetCounterFunction(LookupCounter); - USE(kMegamorphicTestProgram); #ifdef DEBUG i::FLAG_native_code_counters = true; if (primary) { @@ -20947,6 +20947,7 @@ static void StubCacheHelper(bool primary) { } i::FLAG_crankshaft = false; LocalContext env; + env->GetIsolate()->SetCounterFunction(LookupCounter); v8::HandleScope scope(env->GetIsolate()); int initial_probes = probes_counter; int initial_misses = misses_counter; @@ -20976,6 +20977,7 @@ TEST(PrimaryStubCache) { } +#ifdef DEBUG static int cow_arrays_created_runtime = 0; @@ -20985,13 +20987,14 @@ static int* LookupCounterCOWArrays(const char* name) { } return NULL; } +#endif TEST(CheckCOWArraysCreatedRuntimeCounter) { - V8::SetCounterFunction(LookupCounterCOWArrays); #ifdef DEBUG i::FLAG_native_code_counters = true; LocalContext env; + env->GetIsolate()->SetCounterFunction(LookupCounterCOWArrays); v8::HandleScope scope(env->GetIsolate()); int initial_cow_arrays = cow_arrays_created_runtime; CompileRun("var o = [1, 2, 3];");