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

Side by Side Diff: runtime/lib/object.cc

Issue 419103003: Handle load errors in deferred code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/lib_prefix.dart ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 Instance& error = Instance::Handle(prefix.LoadError());
302 return error.raw();
303 }
304
305
293 } // namespace dart 306 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/lib_prefix.dart ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698