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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 9845040: - Make the URI resolution methods used by the tag handler private. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/bin/main.cc ('k') | no next file » | 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 5917)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -2204,14 +2204,27 @@
return Api::NewLocalHandle(result);
} else if (obj.IsLibrary()) {
- // Finalize all classes.
- const char* msg = CheckIsolateState(isolate);
- if (msg != NULL) {
- return Api::NewError(msg);
+ // Check whether class finalization is needed.
+ bool finalize_classes = true;
+ Library& lib = Library::Handle();
+ lib ^= obj.raw();
+
+ // When calling functions in the dart:builtin library do not finalize as it
+ // should have been prefinalized.
+ Library& builtin =
+ Library::Handle(isolate->object_store()->builtin_library());
+ if (builtin.raw() == lib.raw()) {
+ finalize_classes = false;
}
- Library& lib = Library::Handle();
- lib ^= obj.raw();
+ // Finalize all classes if needed.
+ if (finalize_classes) {
+ const char* msg = CheckIsolateState(isolate);
+ if (msg != NULL) {
+ return Api::NewError(msg);
+ }
+ }
+
const Function& function = Function::Handle(
lib.LookupLocalFunction(function_name));
if (function.IsNull()) {
« no previous file with comments | « runtime/bin/main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698