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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 #ifndef PRODUCT | 1060 #ifndef PRODUCT |
1061 void Isolate::ReportReloadError(const Error& error) { | 1061 void Isolate::ReportReloadError(const Error& error) { |
1062 ASSERT(IsReloading()); | 1062 ASSERT(IsReloading()); |
1063 reload_context_->AbortReload(error); | 1063 reload_context_->AbortReload(error); |
1064 delete reload_context_; | 1064 delete reload_context_; |
1065 reload_context_ = NULL; | 1065 reload_context_ = NULL; |
1066 } | 1066 } |
1067 | 1067 |
1068 | 1068 |
1069 void Isolate::OnStackReload() { | 1069 void Isolate::OnStackReload() { |
1070 UNREACHABLE(); | 1070 ReloadSources(); |
1071 } | 1071 } |
1072 | 1072 |
1073 | 1073 |
1074 void Isolate::ReloadSources(bool test_mode) { | 1074 void Isolate::ReloadSources(bool test_mode) { |
1075 ASSERT(!IsReloading()); | 1075 ASSERT(!IsReloading()); |
1076 has_attempted_reload_ = true; | 1076 has_attempted_reload_ = true; |
1077 reload_context_ = new IsolateReloadContext(this, test_mode); | 1077 reload_context_ = new IsolateReloadContext(this, test_mode); |
1078 reload_context_->StartReload(); | 1078 reload_context_->StartReload(); |
1079 } | 1079 } |
1080 | 1080 |
(...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 void IsolateSpawnState::DecrementSpawnCount() { | 2792 void IsolateSpawnState::DecrementSpawnCount() { |
2793 ASSERT(spawn_count_monitor_ != NULL); | 2793 ASSERT(spawn_count_monitor_ != NULL); |
2794 ASSERT(spawn_count_ != NULL); | 2794 ASSERT(spawn_count_ != NULL); |
2795 MonitorLocker ml(spawn_count_monitor_); | 2795 MonitorLocker ml(spawn_count_monitor_); |
2796 ASSERT(*spawn_count_ > 0); | 2796 ASSERT(*spawn_count_ > 0); |
2797 *spawn_count_ = *spawn_count_ - 1; | 2797 *spawn_count_ = *spawn_count_ - 1; |
2798 ml.Notify(); | 2798 ml.Notify(); |
2799 } | 2799 } |
2800 | 2800 |
2801 } // namespace dart | 2801 } // namespace dart |
OLD | NEW |