Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| =================================================================== |
| --- runtime/vm/dart_api_impl.cc (revision 37239) |
| +++ runtime/vm/dart_api_impl.cc (working copy) |
| @@ -4977,7 +4977,7 @@ |
| if (library.IsNull()) { |
| library = Library::New(url_str); |
| library.Register(); |
| - } else if (!library.LoadNotStarted()) { |
| + } else if (!(library.LoadNotStarted() || library.LoadRequested())) { |
|
Ivan Posva
2014/06/13 18:26:39
Double negative makes it hard to understand what i
hausner
2014/06/13 22:41:57
The comment was supposed to make it clearer. Chang
|
| // The source for this library has either been loaded or is in the |
| // process of loading. Return an error. |
| return Api::NewError("%s: library '%s' has already been loaded.", |
| @@ -4992,8 +4992,8 @@ |
| return result; |
| } |
| - // If this is the dart:builtin library, register it with the VM. |
| - if (url_str.Equals("dart:builtin")) { |
| + // If this is the dart:_builtin library, register it with the VM. |
| + if (url_str.Equals("dart:_builtin")) { |
| isolate->object_store()->set_builtin_library(library); |
| Dart_Handle state = Api::CheckIsolateState(isolate); |
| if (::Dart_IsError(state)) { |
| @@ -5039,7 +5039,8 @@ |
| if (!library_prefix.IsNull()) { |
| library_prefix.AddImport(import_ns); |
| } else { |
| - library_prefix = LibraryPrefix::New(prefix_symbol, import_ns, false); |
| + library_prefix = |
| + LibraryPrefix::New(prefix_symbol, import_ns, false, library_vm); |
| library_vm.AddObject(library_prefix, prefix_symbol); |
| } |
| } |