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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 407143004: Change the Dart API call Dart_FInalizeLoading to accept an additional argument (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « runtime/include/dart_api.h ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
===================================================================
--- runtime/vm/dart_api_impl.cc (revision 38461)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -5170,7 +5170,7 @@
// Finalizes classes and invokes Dart core library function that completes
// futures of loadLibrary calls (deferred library loading).
-DART_EXPORT Dart_Handle Dart_FinalizeLoading() {
+DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
Isolate* isolate = Isolate::Current();
DARTSCOPE(isolate);
CHECK_CALLBACK_STATE(isolate);
@@ -5186,19 +5186,21 @@
return state;
}
- const Library& corelib = Library::Handle(isolate, Library::CoreLibrary());
- const String& function_name =
- String::Handle(isolate, String::New("_completeDeferredLoads"));
- const Function& function =
- Function::Handle(isolate,
- corelib.LookupFunctionAllowPrivate(function_name));
- ASSERT(!function.IsNull());
- const Array& args = Array::empty_array();
+ if (complete_futures) {
+ const Library& corelib = Library::Handle(isolate, Library::CoreLibrary());
+ const String& function_name =
+ String::Handle(isolate, String::New("_completeDeferredLoads"));
+ const Function& function =
+ Function::Handle(isolate,
+ corelib.LookupFunctionAllowPrivate(function_name));
+ ASSERT(!function.IsNull());
+ const Array& args = Array::empty_array();
- const Object& res =
- Object::Handle(isolate, DartEntry::InvokeFunction(function, args));
- if (res.IsError() || res.IsUnhandledException()) {
- return Api::NewHandle(isolate, res.raw());
+ const Object& res =
+ Object::Handle(isolate, DartEntry::InvokeFunction(function, args));
+ if (res.IsError() || res.IsUnhandledException()) {
+ return Api::NewHandle(isolate, res.raw());
+ }
}
return Api::Success();
}
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698