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

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

Issue 11413101: Added support for isolate unhandled exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated code review feedback Created 8 years 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/include/dart_api.h ('k') | runtime/tests/vm/vm.status » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 Isolate* isolate = reinterpret_cast<Isolate*>(parameter); 84 Isolate* isolate = reinterpret_cast<Isolate*>(parameter);
85 { 85 {
86 // Print the error if there is one. This may execute dart code to 86 // Print the error if there is one. This may execute dart code to
87 // print the exception object, so we need to use a StartIsolateScope. 87 // print the exception object, so we need to use a StartIsolateScope.
88 StartIsolateScope start_scope(isolate); 88 StartIsolateScope start_scope(isolate);
89 StackZone zone(isolate); 89 StackZone zone(isolate);
90 HandleScope handle_scope(isolate); 90 HandleScope handle_scope(isolate);
91 Error& error = Error::Handle(); 91 Error& error = Error::Handle();
92 error = isolate->object_store()->sticky_error(); 92 error = isolate->object_store()->sticky_error();
93 if (!error.IsNull()) { 93 if (!error.IsNull()) {
94 OS::PrintErr("%s\n", error.ToErrorCString()); 94 OS::PrintErr("in ShutdownIsolate: %s\n", error.ToErrorCString());
95 exit(255);
96 } 95 }
97 } 96 }
98 { 97 {
99 // Shut the isolate down. 98 // Shut the isolate down.
100 SwitchIsolateScope switch_scope(isolate); 99 SwitchIsolateScope switch_scope(isolate);
101 Dart::ShutdownIsolate(); 100 Dart::ShutdownIsolate();
102 } 101 }
103 } 102 }
104 103
105 104
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 447
449 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { 448 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) {
450 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); 449 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port()));
451 if (port.IsError()) { 450 if (port.IsError()) {
452 Exceptions::PropagateError(Error::Cast(port)); 451 Exceptions::PropagateError(Error::Cast(port));
453 } 452 }
454 return port.raw(); 453 return port.raw();
455 } 454 }
456 455
457 } // namespace dart 456 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698