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

Unified Diff: runtime/vm/service_isolate.cc

Issue 1177153005: Enables clean VM shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Kill isolates from the service isolate Created 5 years, 6 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
Index: runtime/vm/service_isolate.cc
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 312667869ff20c14891cfb4979a79e37e5b6b83e..4680820273b390b0d4f63c6f6f8d9205de413e12 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -652,8 +652,7 @@ class RunServiceTask : public ThreadPool::Task {
ServiceIsolate::FinishedInitializing();
- isolate->message_handler()->Run(Dart::thread_pool(),
- NULL,
+ isolate->message_handler()->Run(NULL,
ShutdownIsolate,
reinterpret_cast<uword>(isolate));
}
@@ -668,6 +667,9 @@ class RunServiceTask : public ThreadPool::Task {
StartIsolateScope start_scope(isolate);
StackZone zone(isolate);
HandleScope handle_scope(isolate);
+
+ ServiceIsolate::KillAllIsolates();
+
Error& error = Error::Handle();
error = isolate->object_store()->sticky_error();
if (!error.IsNull()) {
@@ -744,7 +746,7 @@ void ServiceIsolate::Run() {
// Grab the isolate create callback here to avoid race conditions with tests
// that change this after Dart_Initialize returns.
create_callback_ = Isolate::CreateCallback();
- Dart::thread_pool()->Run(new RunServiceTask());
+ ThreadPool::Run(new RunServiceTask());
}
@@ -812,4 +814,9 @@ Dart_Handle ServiceIsolate::LibraryTagHandler(Dart_LibraryTag tag,
return Dart_LoadSource(library, url, source, 0, 0);
}
+
+void ServiceIsolate::KillAllIsolates() {
+ Isolate::KillAllIsolates(isolate_);
+}
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698