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

Unified Diff: runtime/vm/isolate.cc

Issue 2151253003: Do not reload isolates if we are in the process of shutting down the VM (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/isolate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 9be0a0feef65833c58e1ab6d82be332afaae0df2..c20def45467837153a63515762f8a6c5f22139bb 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1072,8 +1072,9 @@ void Isolate::DoneLoading() {
bool Isolate::CanReload() const {
#ifndef PRODUCT
- return (!ServiceIsolate::IsServiceIsolateDescendant(this) &&
- is_runnable() && !IsReloading() && no_reload_scope_depth_ == 0);
+ return !ServiceIsolate::IsServiceIsolateDescendant(this) &&
+ is_runnable() && !IsReloading() && (no_reload_scope_depth_ == 0) &&
+ IsolateCreationEnabled();
#else
return false;
#endif
@@ -2439,6 +2440,12 @@ void Isolate::EnableIsolateCreation() {
}
+bool Isolate::IsolateCreationEnabled() {
+ MonitorLocker ml(isolates_list_monitor_);
+ return creation_enabled_;
+}
+
+
void Isolate::KillLocked(LibMsgId msg_id) {
Dart_CObject kill_msg;
Dart_CObject* list_values[4];
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698