Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index 269ff6c5d973ea26610b39b4a0a182bf04a91e06..3019f479da0a48c6f0b8cc2e0bb8b45b0e20ca16 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -762,7 +762,10 @@ class StartIsolateScope { |
public: |
explicit StartIsolateScope(Isolate* new_isolate) |
: new_isolate_(new_isolate), saved_isolate_(Isolate::Current()) { |
- ASSERT(new_isolate_ != NULL); |
+ if (new_isolate_ == NULL) { |
+ // Do nothing. |
+ return; |
+ } |
if (saved_isolate_ != new_isolate_) { |
ASSERT(Isolate::Current() == NULL); |
Isolate::SetCurrent(new_isolate_); |
@@ -771,6 +774,10 @@ class StartIsolateScope { |
} |
~StartIsolateScope() { |
+ if (new_isolate_ == NULL) { |
+ // Do nothing. |
+ return; |
+ } |
if (saved_isolate_ != new_isolate_) { |
new_isolate_->ClearStackLimit(); |
Isolate::SetCurrent(saved_isolate_); |