Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index 8991390491f3258fde761e22ea96b5170fe7b52e..f6649d6e2474dd16b21e1a582d8bdadea120a254 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(); |