Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/bootstrap_natives.h" | 5 #include "vm/bootstrap_natives.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/exceptions.h" | 9 #include "vm/exceptions.h" |
| 10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 } | 283 } |
| 284 | 284 |
| 285 | 285 |
| 286 DEFINE_NATIVE_ENTRY(LibraryPrefix_load, 1) { | 286 DEFINE_NATIVE_ENTRY(LibraryPrefix_load, 1) { |
| 287 const LibraryPrefix& prefix = | 287 const LibraryPrefix& prefix = |
| 288 LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0)); | 288 LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0)); |
| 289 bool hasCompleted = prefix.LoadLibrary(); | 289 bool hasCompleted = prefix.LoadLibrary(); |
| 290 return Bool::Get(hasCompleted).raw(); | 290 return Bool::Get(hasCompleted).raw(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 | |
| 294 DEFINE_NATIVE_ENTRY(LibraryPrefix_loadError, 1) { | |
| 295 const LibraryPrefix& prefix = | |
| 296 LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0)); | |
| 297 // Currently all errors are Dart instances, e.g. I/O errors | |
| 298 // created by deferred loading code. LanguageErrors from | |
| 299 // failed loading or finalization attempts are propagated and result | |
| 300 // in the isolate's death. | |
| 301 const Object& error = Object::Handle(prefix.LoadError()); | |
|
Ivan Posva
2014/07/31 18:29:04
In that case this should be:
const Instance& error
hausner
2014/07/31 21:12:45
Done.
| |
| 302 return error.raw(); | |
| 303 } | |
| 304 | |
| 305 | |
| 293 } // namespace dart | 306 } // namespace dart |
| OLD | NEW |