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

Unified Diff: runtime/vm/isolate.cc

Issue 2567193002: Added method to IsolateVisitor to check for special isolates (i.e., service / vm isolates) since th… (Closed)
Patch Set: Created 4 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index d790db63fe812573d63109a9bf88e5882255c55f..a98d7286cdd22ef75f11c7b01727724767d8d053 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -128,6 +128,12 @@ static Message* SerializeMessage(Dart_Port dest_port, const Instance& obj) {
}
+bool IsolateVisitor::IsSpecialIsolate(Isolate* isolate) const {
+ return ((isolate == Dart::vm_isolate()) ||
+ ServiceIsolate::IsServiceIsolateDescendant(isolate));
+}
+
+
NoOOBMessageScope::NoOOBMessageScope(Thread* thread) : StackResource(thread) {
thread->DeferOOBMessageInterrupts();
}
@@ -2573,9 +2579,7 @@ class IsolateKillerVisitor : public IsolateVisitor {
// If a target_ is specified, then only kill the target_.
// Otherwise, don't kill the service isolate or vm isolate.
return (((target_ != NULL) && (isolate == target_)) ||
- ((target_ == NULL) &&
- !ServiceIsolate::IsServiceIsolateDescendant(isolate) &&
- (isolate != Dart::vm_isolate())));
+ ((target_ == NULL) && !IsSpecialIsolate(isolate)));
}
Isolate* target_;
« runtime/vm/isolate.h ('K') | « runtime/vm/isolate.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698