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

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: Changed name of IsSpecialIsolate to IsVMInternalIsolate 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
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/service.cc » ('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 d790db63fe812573d63109a9bf88e5882255c55f..7708047f003a3f7acb3a28d864f45718a26aeba5 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::IsVMInternalIsolate(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) && !IsVMInternalIsolate(isolate)));
}
Isolate* target_;
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698