Commit 8ae2fd8d authored by marja's avatar marja Committed by Commit bot

Background parsing: Ensure we don't use the Isolate on a background thread.

BUG=

Review-Url: https://codereview.chromium.org/2182493006
Cr-Commit-Position: refs/heads/master@{#38112}
parent f7fa02f8
......@@ -49,6 +49,11 @@ void BackgroundParsingTask::Run() {
source_->info->set_cached_data(&script_data);
}
// Nullify the Isolate temporarily so that the background parser doesn't
// accidentally use it.
Isolate* isolate = source_->info->isolate();
source_->info->set_isolate(nullptr);
uintptr_t stack_limit =
reinterpret_cast<uintptr_t>(&stack_limit) - stack_size_ * KB;
......@@ -65,6 +70,7 @@ void BackgroundParsingTask::Run() {
script_data->ReleaseDataOwnership();
delete script_data;
}
source_->info->set_isolate(isolate);
}
} // namespace internal
} // namespace v8
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment