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

Unified Diff: vm/dart_api_impl.cc

Issue 8520030: Set the loaded_ flag in RawLibrary when it is completely loaded. This (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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 | « vm/bootstrap.cc ('k') | vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/dart_api_impl.cc
===================================================================
--- vm/dart_api_impl.cc (revision 1579)
+++ vm/dart_api_impl.cc (working copy)
@@ -361,6 +361,11 @@
const String& source,
RawScript::Kind kind,
Dart_Handle* result) {
+ bool update_lib_status = (kind == RawScript::kScript ||
+ kind == RawScript::kLibrary);
+ if (update_lib_status) {
+ lib.SetLoadInProgress();
+ }
const Script& script = Script::Handle(Script::New(url, source, kind));
ASSERT(isolate != NULL);
LongJump* base = isolate->long_jump_base();
@@ -369,8 +374,14 @@
if (setjmp(*jump.Set()) == 0) {
Compiler::Compile(lib, script);
*result = Api::NewLocalHandle(lib);
+ if (update_lib_status) {
+ lib.SetLoaded();
+ }
} else {
SetupErrorResult(result);
+ if (update_lib_status) {
+ lib.SetLoadError();
+ }
}
isolate->set_long_jump_base(base);
}
« no previous file with comments | « vm/bootstrap.cc ('k') | vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698