| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/json.h" | 10 #include "platform/json.h" |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 if ((exception == I->object_store()->out_of_memory()) || | 627 if ((exception == I->object_store()->out_of_memory()) || |
| 628 (exception == I->object_store()->stack_overflow())) { | 628 (exception == I->object_store()->stack_overflow())) { |
| 629 // We didn't notify the debugger when the stack was full. Do it now. | 629 // We didn't notify the debugger when the stack was full. Do it now. |
| 630 I->debugger()->SignalExceptionThrown(Instance::Handle(exception)); | 630 I->debugger()->SignalExceptionThrown(Instance::Handle(exception)); |
| 631 } | 631 } |
| 632 } | 632 } |
| 633 | 633 |
| 634 // Invoke the isolate's unhandled exception callback if there is one. | 634 // Invoke the isolate's unhandled exception callback if there is one. |
| 635 if (Isolate::UnhandledExceptionCallback() != NULL) { | 635 if (Isolate::UnhandledExceptionCallback() != NULL) { |
| 636 Dart_EnterScope(); | 636 Dart_EnterScope(); |
| 637 Dart_Handle error = Api::NewHandle(I, result.raw()); | 637 Dart_Handle error = Api::NewHandle(T, result.raw()); |
| 638 (Isolate::UnhandledExceptionCallback())(error); | 638 (Isolate::UnhandledExceptionCallback())(error); |
| 639 Dart_ExitScope(); | 639 Dart_ExitScope(); |
| 640 } | 640 } |
| 641 | 641 |
| 642 // Generate the error and stacktrace strings for the error message. | 642 // Generate the error and stacktrace strings for the error message. |
| 643 String& exc_str = String::Handle(T->zone()); | 643 String& exc_str = String::Handle(T->zone()); |
| 644 String& stacktrace_str = String::Handle(T->zone()); | 644 String& stacktrace_str = String::Handle(T->zone()); |
| 645 if (result.IsUnhandledException()) { | 645 if (result.IsUnhandledException()) { |
| 646 Zone* zone = T->zone(); | 646 Zone* zone = T->zone(); |
| 647 const UnhandledException& uhe = UnhandledException::Cast(result); | 647 const UnhandledException& uhe = UnhandledException::Cast(result); |
| (...skipping 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2558 } | 2558 } |
| 2559 | 2559 |
| 2560 | 2560 |
| 2561 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) { | 2561 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) { |
| 2562 return DeserializeObject(thread, | 2562 return DeserializeObject(thread, |
| 2563 serialized_message_, serialized_message_len_); | 2563 serialized_message_, serialized_message_len_); |
| 2564 } | 2564 } |
| 2565 | 2565 |
| 2566 | 2566 |
| 2567 } // namespace dart | 2567 } // namespace dart |
| OLD | NEW |