| 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/text_buffer.h" | 10 #include "platform/text_buffer.h" |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 isolate->heap()->CollectAllGarbage(); | 1102 isolate->heap()->CollectAllGarbage(); |
| 1103 VerifyCanonicalVisitor check_canonical(thread); | 1103 VerifyCanonicalVisitor check_canonical(thread); |
| 1104 isolate->heap()->IterateObjects(&check_canonical); | 1104 isolate->heap()->IterateObjects(&check_canonical); |
| 1105 } | 1105 } |
| 1106 #endif // DEBUG | 1106 #endif // DEBUG |
| 1107 return success; | 1107 return success; |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 | 1110 |
| 1111 void Isolate::DeleteReloadContext() { | 1111 void Isolate::DeleteReloadContext() { |
| 1112 // Another thread may be in the middle of GetClassForHeapWalkAt. |
| 1113 Thread* thread = Thread::Current(); |
| 1114 SafepointOperationScope safepoint_scope(thread); |
| 1115 |
| 1112 delete reload_context_; | 1116 delete reload_context_; |
| 1113 reload_context_ = NULL; | 1117 reload_context_ = NULL; |
| 1114 } | 1118 } |
| 1115 #endif // !PRODUCT | 1119 #endif // !PRODUCT |
| 1116 | 1120 |
| 1117 | 1121 |
| 1118 void Isolate::DoneFinalizing() { | 1122 void Isolate::DoneFinalizing() { |
| 1119 NOT_IN_PRODUCT( | 1123 NOT_IN_PRODUCT( |
| 1120 if (IsReloading()) { | 1124 if (IsReloading()) { |
| 1121 reload_context_->FinalizeLoading(); | 1125 reload_context_->FinalizeLoading(); |
| (...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2894 void IsolateSpawnState::DecrementSpawnCount() { | 2898 void IsolateSpawnState::DecrementSpawnCount() { |
| 2895 ASSERT(spawn_count_monitor_ != NULL); | 2899 ASSERT(spawn_count_monitor_ != NULL); |
| 2896 ASSERT(spawn_count_ != NULL); | 2900 ASSERT(spawn_count_ != NULL); |
| 2897 MonitorLocker ml(spawn_count_monitor_); | 2901 MonitorLocker ml(spawn_count_monitor_); |
| 2898 ASSERT(*spawn_count_ > 0); | 2902 ASSERT(*spawn_count_ > 0); |
| 2899 *spawn_count_ = *spawn_count_ - 1; | 2903 *spawn_count_ = *spawn_count_ - 1; |
| 2900 ml.Notify(); | 2904 ml.Notify(); |
| 2901 } | 2905 } |
| 2902 | 2906 |
| 2903 } // namespace dart | 2907 } // namespace dart |
| OLD | NEW |