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/exceptions.h" | 5 #include "vm/exceptions.h" |
6 | 6 |
7 #include "platform/address_sanitizer.h" | 7 #include "platform/address_sanitizer.h" |
8 | 8 |
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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 | 538 |
539 | 539 |
540 void Exceptions::Throw(Thread* thread, const Instance& exception) { | 540 void Exceptions::Throw(Thread* thread, const Instance& exception) { |
541 // Do not notify debugger on stack overflow and out of memory exceptions. | 541 // Do not notify debugger on stack overflow and out of memory exceptions. |
542 // The VM would crash when the debugger calls back into the VM to | 542 // The VM would crash when the debugger calls back into the VM to |
543 // get values of variables. | 543 // get values of variables. |
544 if (FLAG_support_debugger) { | 544 if (FLAG_support_debugger) { |
545 Isolate* isolate = thread->isolate(); | 545 Isolate* isolate = thread->isolate(); |
546 if (exception.raw() != isolate->object_store()->out_of_memory() && | 546 if (exception.raw() != isolate->object_store()->out_of_memory() && |
547 exception.raw() != isolate->object_store()->stack_overflow()) { | 547 exception.raw() != isolate->object_store()->stack_overflow()) { |
548 isolate->debugger()->SignalExceptionThrown(exception); | 548 isolate->debugger()->PauseException(exception); |
549 } | 549 } |
550 } | 550 } |
551 // Null object is a valid exception object. | 551 // Null object is a valid exception object. |
552 ThrowExceptionHelper(thread, exception, | 552 ThrowExceptionHelper(thread, exception, |
553 Stacktrace::Handle(thread->zone()), false); | 553 Stacktrace::Handle(thread->zone()), false); |
554 } | 554 } |
555 | 555 |
556 void Exceptions::ReThrow(Thread* thread, | 556 void Exceptions::ReThrow(Thread* thread, |
557 const Instance& exception, | 557 const Instance& exception, |
558 const Instance& stacktrace) { | 558 const Instance& stacktrace) { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 } | 716 } |
717 | 717 |
718 return DartLibraryCalls::InstanceCreate(library, | 718 return DartLibraryCalls::InstanceCreate(library, |
719 *class_name, | 719 *class_name, |
720 *constructor_name, | 720 *constructor_name, |
721 arguments); | 721 arguments); |
722 } | 722 } |
723 | 723 |
724 | 724 |
725 } // namespace dart | 725 } // namespace dart |
OLD | NEW |