| 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/code_observers.h" | 7 #include "vm/code_observers.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 if (FLAG_print_class_table) { | 206 if (FLAG_print_class_table) { |
| 207 isolate->class_table()->Print(); | 207 isolate->class_table()->Print(); |
| 208 } | 208 } |
| 209 return Error::null(); | 209 return Error::null(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 | 212 |
| 213 void Dart::ShutdownIsolate() { | 213 void Dart::ShutdownIsolate() { |
| 214 Isolate* isolate = Isolate::Current(); | 214 Isolate* isolate = Isolate::Current(); |
| 215 void* callback_data = isolate->init_callback_data(); | 215 void* callback_data = isolate->init_callback_data(); |
| 216 isolate->Shutdown(); | |
| 217 delete isolate; | |
| 218 | |
| 219 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); | 216 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); |
| 220 if (callback != NULL) { | 217 if (callback != NULL) { |
| 221 (callback)(callback_data); | 218 (callback)(callback_data); |
| 222 } | 219 } |
| 220 isolate->Shutdown(); |
| 221 delete isolate; |
| 223 } | 222 } |
| 224 | 223 |
| 225 | 224 |
| 226 uword Dart::AllocateReadOnlyHandle() { | 225 uword Dart::AllocateReadOnlyHandle() { |
| 227 ASSERT(Isolate::Current() == Dart::vm_isolate()); | 226 ASSERT(Isolate::Current() == Dart::vm_isolate()); |
| 228 ASSERT(predefined_handles_ != NULL); | 227 ASSERT(predefined_handles_ != NULL); |
| 229 return predefined_handles_->handles_.AllocateScopedHandle(); | 228 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 230 } | 229 } |
| 231 | 230 |
| 232 | 231 |
| 233 bool Dart::IsReadOnlyHandle(uword address) { | 232 bool Dart::IsReadOnlyHandle(uword address) { |
| 234 ASSERT(predefined_handles_ != NULL); | 233 ASSERT(predefined_handles_ != NULL); |
| 235 return predefined_handles_->handles_.IsValidScopedHandle(address); | 234 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 236 } | 235 } |
| 237 | 236 |
| 238 } // namespace dart | 237 } // namespace dart |
| OLD | NEW |