| 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() {
|
| + if (profiler_data() == NULL) {
|
| + // Profiler not setup for isolate.
|
| + return 0;
|
| + }
|
| + 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;
|
| }
|
|
|
|
|
|
|