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/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 "vm/bigint_store.h" | 9 #include "vm/bigint_store.h" |
10 #include "vm/code_index_table.h" | 10 #include "vm/code_index_table.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 invoked_functions[i]->ToFullyQualifiedCString()); | 257 invoked_functions[i]->ToFullyQualifiedCString()); |
258 } | 258 } |
259 } | 259 } |
260 | 260 |
261 | 261 |
262 void Isolate::Shutdown() { | 262 void Isolate::Shutdown() { |
263 ASSERT(this == Isolate::Current()); | 263 ASSERT(this == Isolate::Current()); |
264 ASSERT(top_resource_ == NULL); | 264 ASSERT(top_resource_ == NULL); |
265 ASSERT((heap_ == NULL) || heap_->Verify()); | 265 ASSERT((heap_ == NULL) || heap_->Verify()); |
266 | 266 |
| 267 // Clean up debugger resources. Shutting down the debugger |
| 268 // requires a handle zone. We must set up a temporary zone because |
| 269 // Isolate::Shutdown is called without a zone. |
| 270 { |
| 271 Zone zone(this); |
| 272 HandleScope handle_scope(this); |
| 273 debugger_->Shutdown(); |
| 274 } |
| 275 |
267 // Close all the ports owned by this isolate. | 276 // Close all the ports owned by this isolate. |
268 PortMap::ClosePorts(); | 277 PortMap::ClosePorts(); |
269 | 278 |
270 delete message_queue(); | 279 delete message_queue(); |
271 set_message_queue(NULL); | 280 set_message_queue(NULL); |
272 | 281 |
273 // Dump all accumalated timer data for the isolate. | 282 // Dump all accumalated timer data for the isolate. |
274 timer_list_.ReportTimers(); | 283 timer_list_.ReportTimers(); |
275 if (FLAG_report_invocation_count) { | 284 if (FLAG_report_invocation_count) { |
276 PrintInvokedFunctions(); | 285 PrintInvokedFunctions(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } | 404 } |
396 | 405 |
397 | 406 |
398 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor) { | 407 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor) { |
399 if (api_state() != NULL) { | 408 if (api_state() != NULL) { |
400 api_state()->VisitWeakHandles(visitor); | 409 api_state()->VisitWeakHandles(visitor); |
401 } | 410 } |
402 } | 411 } |
403 | 412 |
404 } // namespace dart | 413 } // namespace dart |
OLD | NEW |