| 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/dart.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/become.h" | 7 #include "vm/become.h" |
| 8 #include "vm/code_observers.h" | 8 #include "vm/code_observers.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 } | 648 } |
| 649 | 649 |
| 650 return buffer.Steal(); | 650 return buffer.Steal(); |
| 651 } | 651 } |
| 652 | 652 |
| 653 | 653 |
| 654 void Dart::RunShutdownCallback() { | 654 void Dart::RunShutdownCallback() { |
| 655 Isolate* isolate = Isolate::Current(); | 655 Isolate* isolate = Isolate::Current(); |
| 656 void* callback_data = isolate->init_callback_data(); | 656 void* callback_data = isolate->init_callback_data(); |
| 657 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); | 657 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); |
| 658 ServiceIsolate::SendIsolateShutdownMessage(); | |
| 659 if (callback != NULL) { | 658 if (callback != NULL) { |
| 660 (callback)(callback_data); | 659 (callback)(callback_data); |
| 661 } | 660 } |
| 662 } | 661 } |
| 663 | 662 |
| 664 | 663 |
| 665 void Dart::ShutdownIsolate(Isolate* isolate) { | 664 void Dart::ShutdownIsolate(Isolate* isolate) { |
| 666 ASSERT(Isolate::Current() == NULL); | 665 ASSERT(Isolate::Current() == NULL); |
| 667 // We need to enter the isolate in order to shut it down. | 666 // We need to enter the isolate in order to shut it down. |
| 668 bool result = Thread::EnterIsolate(isolate); | 667 bool result = Thread::EnterIsolate(isolate); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 return predefined_handles_->handles_.IsValidScopedHandle(address); | 705 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 707 } | 706 } |
| 708 | 707 |
| 709 | 708 |
| 710 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 709 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 711 ASSERT(predefined_handles_ != NULL); | 710 ASSERT(predefined_handles_ != NULL); |
| 712 return predefined_handles_->api_handles_.IsValidHandle(handle); | 711 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 713 } | 712 } |
| 714 | 713 |
| 715 } // namespace dart | 714 } // namespace dart |
| OLD | NEW |