[VM] Fix for issue 33277 (skip HasAttemptedReload check for kernel

isolate too).

Bug: 33277
Change-Id: I14c1a1b4e0fd07be6520fd8f77b9c6abddb5a5d0
Reviewed-on: https://dart-review.googlesource.com/57441
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
asiva 2018-05-30 20:14:45 +00:00 committed by commit-bot@chromium.org
parent 0e3ca9a668
commit 3027302af6
2 changed files with 4 additions and 1 deletions

View file

@ -1845,6 +1845,7 @@ void Isolate::Shutdown() {
#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
if (FLAG_check_reloaded && is_runnable() && (this != Dart::vm_isolate()) &&
!KernelIsolate::IsKernelIsolate(this) &&
!ServiceIsolate::IsServiceIsolateDescendant(this)) {
if (!HasAttemptedReload()) {
FATAL(

View file

@ -162,7 +162,6 @@ class RunKernelTask : public ThreadPool::Task {
}
ASSERT(KernelIsolate::IsKernelIsolate(I));
KernelIsolate::SetKernelIsolate(NULL);
KernelIsolate::SetLoadPort(ILLEGAL_PORT);
// Shut the isolate down.
@ -170,6 +169,9 @@ class RunKernelTask : public ThreadPool::Task {
if (FLAG_trace_kernel) {
OS::Print(DART_KERNEL_ISOLATE_NAME ": Shutdown.\n");
}
// This should be the last line so the check
// IsKernelIsolate works during the shutdown process.
KernelIsolate::SetKernelIsolate(NULL);
}
bool RunMain(Isolate* I) {