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_exit() || | |
1019 message_handler()->paused_on_start()) { | |
turnidge
2014/05/28 20:51:14
How do you feel about adding...
debugger()->I
Cutch
2014/05/28 20:54:06
Done.
| |
1020 // Paused before start / exit. Don't tick. | |
1021 return 0; | |
1022 } | |
1018 InterruptableThreadState* state = thread_state(); | 1023 InterruptableThreadState* state = thread_state(); |
1019 if (state == NULL) { | 1024 if (state == NULL) { |
1020 // Isolate is not scheduled on a thread. | 1025 // Isolate is not scheduled on a thread. |
1021 ProfileIdle(); | 1026 ProfileIdle(); |
1022 return 1; | 1027 return 1; |
1023 } | 1028 } |
1024 ASSERT(state->id != Thread::kInvalidThreadId); | 1029 ASSERT(state->id != Thread::kInvalidThreadId); |
1025 ThreadInterrupter::InterruptThread(state); | 1030 ThreadInterrupter::InterruptThread(state); |
1026 return 1; | 1031 return 1; |
1027 } | 1032 } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1206 return func.raw(); | 1211 return func.raw(); |
1207 } | 1212 } |
1208 | 1213 |
1209 | 1214 |
1210 void IsolateSpawnState::Cleanup() { | 1215 void IsolateSpawnState::Cleanup() { |
1211 SwitchIsolateScope switch_scope(isolate()); | 1216 SwitchIsolateScope switch_scope(isolate()); |
1212 Dart::ShutdownIsolate(); | 1217 Dart::ShutdownIsolate(); |
1213 } | 1218 } |
1214 | 1219 |
1215 } // namespace dart | 1220 } // namespace dart |
OLD | NEW |