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

Unified Diff: runtime/vm/dart_entry.cc

Issue 1299493007: Rework service extensions to be safe (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 5f029e9f1d437324a90ba764665fe294c0ac1560..1053404fda494ed42346e4db8766c5160386d7e6 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -558,6 +558,20 @@ RawObject* DartLibraryCalls::HandleMessage(const Object& handler,
}
+RawObject* DartLibraryCalls::DrainMicrotaskQueue() {
+ Isolate* isolate = Isolate::Current();
+ Library& isolate_lib = Library::Handle(isolate, Library::IsolateLibrary());
+ ASSERT(!isolate_lib.IsNull());
+ Function& function = Function::Handle(isolate,
+ isolate_lib.LookupFunctionAllowPrivate(
+ Symbols::_runPendingImmediateCallback()));
+ const Object& result = Object::Handle(isolate,
+ DartEntry::InvokeFunction(function, Object::empty_array()));
+ ASSERT(result.IsNull() || result.IsError());
+ return result.raw();
+}
+
+
RawObject* DartLibraryCalls::MapSetAt(const Instance& map,
const Instance& key,
const Instance& value) {
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698