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

Side by Side Diff: runtime/vm/exceptions.cc

Issue 10544159: Fix issue 3636, break on exception (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/vm/debugger.cc ('k') | no next file » | 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/exceptions.h" 5 #include "vm/exceptions.h"
6 6
7 #include "vm/cpu.h" 7 #include "vm/cpu.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 } 240 }
241 // Throw TypeError instance. 241 // Throw TypeError instance.
242 Exceptions::Throw(type_error); 242 Exceptions::Throw(type_error);
243 UNREACHABLE(); 243 UNREACHABLE();
244 } 244 }
245 245
246 246
247 void Exceptions::Throw(const Instance& exception) { 247 void Exceptions::Throw(const Instance& exception) {
248 Isolate* isolate = Isolate::Current(); 248 Isolate* isolate = Isolate::Current();
249 if (isolate->debugger()->IsActive()) { 249 isolate->debugger()->SignalExceptionThrown(exception);
250 isolate->debugger()->SignalExceptionThrown(exception);
251 }
252 // Null object is a valid exception object. 250 // Null object is a valid exception object.
253 ThrowExceptionHelper(exception, Instance::Handle(isolate)); 251 ThrowExceptionHelper(exception, Instance::Handle(isolate));
254 } 252 }
255 253
256 254
257 void Exceptions::ReThrow(const Instance& exception, 255 void Exceptions::ReThrow(const Instance& exception,
258 const Instance& stacktrace) { 256 const Instance& stacktrace) {
259 // Null object is a valid exception object. 257 // Null object is a valid exception object.
260 ThrowExceptionHelper(exception, stacktrace); 258 ThrowExceptionHelper(exception, stacktrace);
261 } 259 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 case kIsolateSpawn: 359 case kIsolateSpawn:
362 library = Library::IsolateLibrary(); 360 library = Library::IsolateLibrary();
363 class_name = String::NewSymbol("IsolateSpawnException"); 361 class_name = String::NewSymbol("IsolateSpawnException");
364 break; 362 break;
365 } 363 }
366 364
367 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); 365 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments);
368 } 366 }
369 367
370 } // namespace dart 368 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698