Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index 35be737034cc8e4dad41d78a6a61baa1475a0c90..8b8f6f21a5e497210fb22f3b64013640d711efca 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -142,6 +142,8 @@ bool Service::ListenStream(const char* stream_id) { |
} |
} |
if (stream_listen_callback_) { |
+ Thread* T = Thread::Current(); |
+ TransitionVMToNative transition(T); |
return (*stream_listen_callback_)(stream_id); |
} |
return false; |
@@ -162,12 +164,15 @@ void Service::CancelStream(const char* stream_id) { |
} |
} |
if (stream_cancel_callback_) { |
+ Thread* T = Thread::Current(); |
+ TransitionVMToNative transition(T); |
return (*stream_cancel_callback_)(stream_id); |
} |
} |
RawObject* Service::RequestAssets() { |
Thread* T = Thread::Current(); |
+ TransitionVMToNative transition(T); |
Api::Scope api_scope(T); |
if (get_service_assets_callback_ == NULL) { |
return Object::null(); |