| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/dart_api_state.h" | 7 #include "vm/dart_api_state.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/freelist.h" | 9 #include "vm/freelist.h" |
| 10 #include "vm/handles.h" | 10 #include "vm/handles.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 isolate->set_init_callback_data(data); | 169 isolate->set_init_callback_data(data); |
| 170 if (FLAG_print_class_table) { | 170 if (FLAG_print_class_table) { |
| 171 isolate->class_table()->Print(); | 171 isolate->class_table()->Print(); |
| 172 } | 172 } |
| 173 return Error::null(); | 173 return Error::null(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 | 176 |
| 177 void Dart::ShutdownIsolate() { | 177 void Dart::ShutdownIsolate() { |
| 178 Isolate* isolate = Isolate::Current(); | 178 Isolate* isolate = Isolate::Current(); |
| 179 if (FLAG_trace_isolates) { |
| 180 isolate->heap()->PrintSizes(); |
| 181 } |
| 179 void* callback_data = isolate->init_callback_data(); | 182 void* callback_data = isolate->init_callback_data(); |
| 180 isolate->Shutdown(); | 183 isolate->Shutdown(); |
| 181 delete isolate; | 184 delete isolate; |
| 182 | 185 |
| 183 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); | 186 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); |
| 184 if (callback != NULL) { | 187 if (callback != NULL) { |
| 185 (callback)(callback_data); | 188 (callback)(callback_data); |
| 186 } | 189 } |
| 187 } | 190 } |
| 188 | 191 |
| 189 } // namespace dart | 192 } // namespace dart |
| OLD | NEW |