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

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

Issue 290633010: Move microtask queueing logic from JavaScript to C++ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle comments Created 6 years, 7 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/v8natives.js ('k') | test/mjsunit/runtime-gen/getmicrotaskstate.js » ('j') | 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 93c8e41f053795e02fb9a4cd698c525ec3db1ac2..cbead0fc05757971ddb5c9c5fb86316cc09661d5 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -20821,6 +20821,25 @@ TEST(SetAutorunMicrotasks) {
}
+TEST(RunMicrotasksWithoutEnteringContext) {
+ v8::Isolate* isolate = CcTest::isolate();
+ HandleScope handle_scope(isolate);
+ isolate->SetAutorunMicrotasks(false);
+ Handle<Context> context = Context::New(isolate);
+ {
+ Context::Scope context_scope(context);
+ CompileRun("var ext1Calls = 0;");
+ isolate->EnqueueMicrotask(Function::New(isolate, MicrotaskOne));
+ }
+ isolate->RunMicrotasks();
+ {
+ Context::Scope context_scope(context);
+ CHECK_EQ(1, CompileRun("ext1Calls")->Int32Value());
+ }
+ isolate->SetAutorunMicrotasks(true);
+}
+
+
static int probes_counter = 0;
static int misses_counter = 0;
static int updates_counter = 0;
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/runtime-gen/getmicrotaskstate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698