| 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);
|
| }
|
|
|