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

Unified Diff: src/d8.cc

Issue 1209403005: Let the second pass phantom callbacks run in a separate task on the foreground thread. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Run second pass callbacks synchronously when GC is forced. Created 5 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/d8.h ('k') | src/global-handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 83bbd7e20f79933fea1539790e665dcfccf283da..3137ac2a9f66cc6ce154903030ea6a848f922d99 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -347,6 +347,7 @@ bool Shell::ExecuteString(Isolate* isolate, Handle<String> source,
return false;
}
result = script->Run();
+ EmptyMessageQueues(isolate);
data->realm_current_ = data->realm_switch_;
}
if (result.IsEmpty()) {
@@ -1985,6 +1986,11 @@ void Shell::CollectGarbage(Isolate* isolate) {
}
+void Shell::EmptyMessageQueues(Isolate* isolate) {
+ while (v8::platform::PumpMessageLoop(g_platform, isolate)) continue;
+}
+
+
#ifndef V8_SHARED
bool Shell::SerializeValue(Isolate* isolate, Handle<Value> value,
const ObjectList& to_transfer,
« no previous file with comments | « src/d8.h ('k') | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698