| 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/text_buffer.h" | 10 #include "platform/text_buffer.h" |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 if (!unwind.is_user_initiated()) { | 645 if (!unwind.is_user_initiated()) { |
| 646 return MessageHandler::kShutdown; | 646 return MessageHandler::kShutdown; |
| 647 } | 647 } |
| 648 } | 648 } |
| 649 return MessageHandler::kError; | 649 return MessageHandler::kError; |
| 650 } | 650 } |
| 651 | 651 |
| 652 | 652 |
| 653 MessageHandler::MessageStatus IsolateMessageHandler::ProcessUnhandledException( | 653 MessageHandler::MessageStatus IsolateMessageHandler::ProcessUnhandledException( |
| 654 const Error& result) { | 654 const Error& result) { |
| 655 NoReloadScope no_reload_scope(T->isolate(), T); |
| 655 // Generate the error and stacktrace strings for the error message. | 656 // Generate the error and stacktrace strings for the error message. |
| 656 String& exc_str = String::Handle(T->zone()); | 657 String& exc_str = String::Handle(T->zone()); |
| 657 String& stacktrace_str = String::Handle(T->zone()); | 658 String& stacktrace_str = String::Handle(T->zone()); |
| 658 if (result.IsUnhandledException()) { | 659 if (result.IsUnhandledException()) { |
| 659 Zone* zone = T->zone(); | 660 Zone* zone = T->zone(); |
| 660 const UnhandledException& uhe = UnhandledException::Cast(result); | 661 const UnhandledException& uhe = UnhandledException::Cast(result); |
| 661 const Instance& exception = Instance::Handle(zone, uhe.exception()); | 662 const Instance& exception = Instance::Handle(zone, uhe.exception()); |
| 662 Object& tmp = Object::Handle(zone); | 663 Object& tmp = Object::Handle(zone); |
| 663 tmp = DartLibraryCalls::ToString(exception); | 664 tmp = DartLibraryCalls::ToString(exception); |
| 664 if (!tmp.IsString()) { | 665 if (!tmp.IsString()) { |
| (...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2945 void IsolateSpawnState::DecrementSpawnCount() { | 2946 void IsolateSpawnState::DecrementSpawnCount() { |
| 2946 ASSERT(spawn_count_monitor_ != NULL); | 2947 ASSERT(spawn_count_monitor_ != NULL); |
| 2947 ASSERT(spawn_count_ != NULL); | 2948 ASSERT(spawn_count_ != NULL); |
| 2948 MonitorLocker ml(spawn_count_monitor_); | 2949 MonitorLocker ml(spawn_count_monitor_); |
| 2949 ASSERT(*spawn_count_ > 0); | 2950 ASSERT(*spawn_count_ > 0); |
| 2950 *spawn_count_ = *spawn_count_ - 1; | 2951 *spawn_count_ = *spawn_count_ - 1; |
| 2951 ml.Notify(); | 2952 ml.Notify(); |
| 2952 } | 2953 } |
| 2953 | 2954 |
| 2954 } // namespace dart | 2955 } // namespace dart |
| OLD | NEW |