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 "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/json.h" | 9 #include "platform/json.h" |
10 #include "lib/mirrors.h" | 10 #include "lib/mirrors.h" |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 | 1008 |
1009 intptr_t Isolate::ProfileInterrupt() { | 1009 intptr_t Isolate::ProfileInterrupt() { |
1010 if (profiler_data() == NULL) { | 1010 if (profiler_data() == NULL) { |
1011 // Profiler not setup for isolate. | 1011 // Profiler not setup for isolate. |
1012 return 0; | 1012 return 0; |
1013 } | 1013 } |
1014 if (profiler_data()->blocked()) { | 1014 if (profiler_data()->blocked()) { |
1015 // Profiler blocked for this isolate. | 1015 // Profiler blocked for this isolate. |
1016 return 0; | 1016 return 0; |
1017 } | 1017 } |
| 1018 if (message_handler()->paused_on_start() || |
| 1019 message_handler()->paused_on_exit() || |
| 1020 debugger()->IsPaused()) { |
| 1021 // Paused at start / exit / breakpoint. Don't tick. |
| 1022 return 0; |
| 1023 } |
1018 InterruptableThreadState* state = thread_state(); | 1024 InterruptableThreadState* state = thread_state(); |
1019 if (state == NULL) { | 1025 if (state == NULL) { |
1020 // Isolate is not scheduled on a thread. | 1026 // Isolate is not scheduled on a thread. |
1021 ProfileIdle(); | 1027 ProfileIdle(); |
1022 return 1; | 1028 return 1; |
1023 } | 1029 } |
1024 ASSERT(state->id != Thread::kInvalidThreadId); | 1030 ASSERT(state->id != Thread::kInvalidThreadId); |
1025 ThreadInterrupter::InterruptThread(state); | 1031 ThreadInterrupter::InterruptThread(state); |
1026 return 1; | 1032 return 1; |
1027 } | 1033 } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 return func.raw(); | 1212 return func.raw(); |
1207 } | 1213 } |
1208 | 1214 |
1209 | 1215 |
1210 void IsolateSpawnState::Cleanup() { | 1216 void IsolateSpawnState::Cleanup() { |
1211 SwitchIsolateScope switch_scope(isolate()); | 1217 SwitchIsolateScope switch_scope(isolate()); |
1212 Dart::ShutdownIsolate(); | 1218 Dart::ShutdownIsolate(); |
1213 } | 1219 } |
1214 | 1220 |
1215 } // namespace dart | 1221 } // namespace dart |
OLD | NEW |