Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Unified Diff: test/cctest/test-api.cc

Issue 412513003: Version 3.27.34.7 (merged r22223) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.27
Patch Set: updates Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index d1f25def57ad3eedf0906bbae0c3c7e7401ccd64..7fc80b3a914ca823e88d642ec4e01ee7e8e130c6 100644
--- a/test/cctest/test-api.cc
+++ b/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];");
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698