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 "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/json.h" | 9 #include "platform/json.h" |
10 #include "lib/mirrors.h" | 10 #include "lib/mirrors.h" |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 IsolateSpawnState* state = NULL; | 521 IsolateSpawnState* state = NULL; |
522 { | 522 { |
523 MutexLocker ml(isolate->mutex()); | 523 MutexLocker ml(isolate->mutex()); |
524 state = reinterpret_cast<IsolateSpawnState*>(isolate->spawn_data()); | 524 state = reinterpret_cast<IsolateSpawnState*>(isolate->spawn_data()); |
525 isolate->set_spawn_data(0); | 525 isolate->set_spawn_data(0); |
526 } | 526 } |
527 { | 527 { |
528 StartIsolateScope start_scope(isolate); | 528 StartIsolateScope start_scope(isolate); |
529 StackZone zone(isolate); | 529 StackZone zone(isolate); |
530 HandleScope handle_scope(isolate); | 530 HandleScope handle_scope(isolate); |
531 if (!ClassFinalizer::FinalizeTypeHierarchy()) { | 531 if (!ClassFinalizer::ProcessPendingClasses()) { |
532 // Error is in sticky error already. | 532 // Error is in sticky error already. |
533 return false; | 533 return false; |
534 } | 534 } |
535 | 535 |
536 // Set up specific unhandled exception handler. | 536 // Set up specific unhandled exception handler. |
537 const String& callback_name = String::Handle( | 537 const String& callback_name = String::Handle( |
538 isolate, String::New(state->exception_callback_name())); | 538 isolate, String::New(state->exception_callback_name())); |
539 isolate->object_store()-> | 539 isolate->object_store()-> |
540 set_unhandled_exception_handler(callback_name); | 540 set_unhandled_exception_handler(callback_name); |
541 | 541 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 return func.raw(); | 1120 return func.raw(); |
1121 } | 1121 } |
1122 | 1122 |
1123 | 1123 |
1124 void IsolateSpawnState::Cleanup() { | 1124 void IsolateSpawnState::Cleanup() { |
1125 SwitchIsolateScope switch_scope(isolate()); | 1125 SwitchIsolateScope switch_scope(isolate()); |
1126 Dart::ShutdownIsolate(); | 1126 Dart::ShutdownIsolate(); |
1127 } | 1127 } |
1128 | 1128 |
1129 } // namespace dart | 1129 } // namespace dart |
OLD | NEW |