Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: runtime/vm/service.cc

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698