| Index: runtime/vm/dart_api_impl.cc
 | 
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
 | 
| index 6e668c84ffb555a4adbea9a2016dcf1beaba48fd..8ee0c5dc52f7611ff02fa23ed1bd11b4e67077d1 100644
 | 
| --- a/runtime/vm/dart_api_impl.cc
 | 
| +++ b/runtime/vm/dart_api_impl.cc
 | 
| @@ -1464,21 +1464,25 @@ DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) {
 | 
|  }
 | 
|  
 | 
|  
 | 
| -DART_EXPORT void Dart_ThreadDisableProfiling() {
 | 
| -  Thread* T = Thread::Current();
 | 
| -  if (T == NULL) {
 | 
| +DART_EXPORT void Dart_IsolateBlocked() {
 | 
| +  Isolate* isolate = Isolate::Current();
 | 
| +  CHECK_ISOLATE(isolate);
 | 
| +  IsolateProfilerData* profiler_data = isolate->profiler_data();
 | 
| +  if (profiler_data == NULL) {
 | 
|      return;
 | 
|    }
 | 
| -  T->DisableThreadInterrupts();
 | 
| +  profiler_data->Block();
 | 
|  }
 | 
|  
 | 
|  
 | 
| -DART_EXPORT void Dart_ThreadEnableProfiling() {
 | 
| -  Thread* T = Thread::Current();
 | 
| -  if (T == NULL) {
 | 
| +DART_EXPORT void Dart_IsolateUnblocked() {
 | 
| +  Isolate* isolate = Isolate::Current();
 | 
| +  CHECK_ISOLATE(isolate);
 | 
| +  IsolateProfilerData* profiler_data = isolate->profiler_data();
 | 
| +  if (profiler_data == NULL) {
 | 
|      return;
 | 
|    }
 | 
| -  T->EnableThreadInterrupts();
 | 
| +  profiler_data->Unblock();
 | 
|  }
 | 
|  
 | 
|  
 | 
| 
 |