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

Unified Diff: runtime/vm/isolate.cc

Issue 1537543002: Fix for issue 25236 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 years 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/gc_sweeper.cc ('k') | runtime/vm/os_thread.h » ('j') | 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 fe5289180a6a853a853c82ff35c8e883cfc0c9fe..c421713b21531fcd4ec58dddad016715501fb7a6 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -876,7 +876,12 @@ Isolate* Isolate::Init(const char* name_prefix,
// TODO(5411455): For now just set the recently created isolate as
// the current isolate.
- Thread::EnterIsolate(result);
+ if (!Thread::EnterIsolate(result)) {
+ // We failed to enter the isolate, it is possible the VM is shutting down,
+ // return back a NULL so that CreateIsolate reports back an error.
+ delete result;
+ return NULL;
+ }
// Setup the isolate message handler.
MessageHandler* handler = new IsolateMessageHandler(result);
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/os_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698