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 "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/json.h" | 10 #include "platform/json.h" |
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1643 | 1643 |
1644 ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT); | 1644 ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT); |
1645 #undef ISOLATE_METRIC_PRINT | 1645 #undef ISOLATE_METRIC_PRINT |
1646 THR_Print("\n"); | 1646 THR_Print("\n"); |
1647 } | 1647 } |
1648 } | 1648 } |
1649 | 1649 |
1650 | 1650 |
1651 void Isolate::Shutdown() { | 1651 void Isolate::Shutdown() { |
1652 ASSERT(this == Isolate::Current()); | 1652 ASSERT(this == Isolate::Current()); |
1653 ASSERT(top_resource() == NULL); | |
1654 #if defined(DEBUG) | 1653 #if defined(DEBUG) |
1655 if (heap_ != NULL) { | 1654 if (heap_ != NULL) { |
1656 // The VM isolate keeps all objects marked. | 1655 // The VM isolate keeps all objects marked. |
1657 heap_->Verify(this == Dart::vm_isolate() ? kRequireMarked : kForbidMarked); | 1656 heap_->Verify(this == Dart::vm_isolate() ? kRequireMarked : kForbidMarked); |
1658 } | 1657 } |
1659 #endif // DEBUG | 1658 #endif // DEBUG |
1660 | 1659 |
1661 // Wait until all background compilation has finished. | 1660 // Wait until all background compilation has finished. |
1662 BackgroundCompiler::Stop(background_compiler_); | 1661 BackgroundCompiler::Stop(background_compiler_); |
1663 | 1662 |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2602 serialized_message_, serialized_message_len_); | 2601 serialized_message_, serialized_message_len_); |
2603 } | 2602 } |
2604 | 2603 |
2605 | 2604 |
2606 void IsolateSpawnState::Cleanup() { | 2605 void IsolateSpawnState::Cleanup() { |
2607 SwitchIsolateScope switch_scope(I); | 2606 SwitchIsolateScope switch_scope(I); |
2608 Dart::ShutdownIsolate(); | 2607 Dart::ShutdownIsolate(); |
2609 } | 2608 } |
2610 | 2609 |
2611 } // namespace dart | 2610 } // namespace dart |
OLD | NEW |