Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 4c04cba04ea5fe673abe48b4a715201a6fefb073..dfcb94cf479630bbd937d5d1a7d9f6017f9a0e7f 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -25,6 +25,7 @@ |
#include "vm/object.h" |
#include "vm/object_store.h" |
#include "vm/port.h" |
+#include "vm/profiler.h" |
#include "vm/resolver.h" |
#include "vm/reusable_handles.h" |
#include "vm/service.h" |
@@ -1313,6 +1314,28 @@ DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) { |
} |
+DART_EXPORT void Dart_IsolateBlocked() { |
+ Isolate* isolate = Isolate::Current(); |
+ CHECK_ISOLATE(isolate); |
+ IsolateProfilerData* profiler_data = isolate->profiler_data(); |
+ if (profiler_data == NULL) { |
+ return; |
+ } |
+ profiler_data->Block(); |
+} |
+ |
+ |
+DART_EXPORT void Dart_IsolateUnblocked() { |
+ Isolate* isolate = Isolate::Current(); |
+ CHECK_ISOLATE(isolate); |
+ IsolateProfilerData* profiler_data = isolate->profiler_data(); |
+ if (profiler_data == NULL) { |
+ return; |
+ } |
+ profiler_data->Unblock(); |
+} |
+ |
+ |
DART_EXPORT void Dart_ExitIsolate() { |
CHECK_ISOLATE(Isolate::Current()); |
Isolate::SetCurrent(NULL); |