Chromium Code Reviews| Index: runtime/vm/isolate.cc |
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
| index 077e7745dff9e9e04af947878e194e542b90d72f..d95cac55a5b90503b5fedee3ccd0c23f98da7dea 100644 |
| --- a/runtime/vm/isolate.cc |
| +++ b/runtime/vm/isolate.cc |
| @@ -1004,15 +1004,24 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) { |
| } |
| -void Isolate::ProfileInterrupt() { |
| +intptr_t Isolate::ProfileInterrupt() { |
|
Ivan Posva
2014/05/25 12:25:16
What other values besides true/false do you expect
Cutch
2014/05/26 06:59:35
I've switched this to return true / false.
|
| + if (profiler_data() == NULL) { |
| + // Profiler not setup for isolate. |
| + return 0; |
|
Anders Johnsen
2014/05/25 18:36:34
These should probably be enum values, if more than
|
| + } |
| + if (profiler_data()->blocked()) { |
| + // Profiler blocked for this isolate. |
| + return 0; |
| + } |
| InterruptableThreadState* state = thread_state(); |
| if (state == NULL) { |
| // Isolate is not scheduled on a thread. |
| ProfileIdle(); |
| - return; |
| + return 1; |
| } |
| ASSERT(state->id != Thread::kInvalidThreadId); |
| ThreadInterrupter::InterruptThread(state); |
| + return 1; |
| } |