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

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

Issue 6733030: Allow calling stats API functions before we have an isolate. (Closed)
Patch Set: Created 9 years, 9 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/api.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 4125b3ce266f808a34672ca37d5495a4a21e24db..2a4fe138908a514cafa82741082040c52ac87054 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -13181,7 +13181,14 @@ TEST(MultipleIsolatesOnIndividualThreads) {
class InitDefaultIsolateThread : public v8::internal::Thread {
public:
- enum TestCase { IgnoreOOM, SetResourceConstraints, SetFatalHandler };
+ enum TestCase {
+ IgnoreOOM,
+ SetResourceConstraints,
+ SetFatalHandler,
+ SetCounterFunction,
+ SetCreateHistogramFunction,
+ SetAddHistogramSampleFunction
+ };
explicit InitDefaultIsolateThread(TestCase testCase)
: Thread(NULL, "InitDefaultIsolateThread"),
@@ -13206,6 +13213,18 @@ class InitDefaultIsolateThread : public v8::internal::Thread {
case SetFatalHandler:
v8::V8::SetFatalErrorHandler(NULL);
break;
+
+ case SetCounterFunction:
+ v8::V8::SetCounterFunction(NULL);
+ break;
+
+ case SetCreateHistogramFunction:
+ v8::V8::SetCreateHistogramFunction(NULL);
+ break;
+
+ case SetAddHistogramSampleFunction:
+ v8::V8::SetAddHistogramSampleFunction(NULL);
+ break;
}
result_ = true;
}
@@ -13237,6 +13256,18 @@ TEST(InitializeDefaultIsolateOnSecondaryThread3) {
InitializeTestHelper(InitDefaultIsolateThread::SetFatalHandler);
}
+TEST(InitializeDefaultIsolateOnSecondaryThread4) {
+ InitializeTestHelper(InitDefaultIsolateThread::SetCounterFunction);
+}
+
+TEST(InitializeDefaultIsolateOnSecondaryThread5) {
+ InitializeTestHelper(InitDefaultIsolateThread::SetCreateHistogramFunction);
+}
+
+TEST(InitializeDefaultIsolateOnSecondaryThread6) {
+ InitializeTestHelper(InitDefaultIsolateThread::SetAddHistogramSampleFunction);
+}
+
TEST(StringCheckMultipleContexts) {
const char* code =
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698