summaryrefslogtreecommitdiff
path: root/deps/v8/src/background-parsing-task.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/background-parsing-task.cc')
-rw-r--r--deps/v8/src/background-parsing-task.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/deps/v8/src/background-parsing-task.cc b/deps/v8/src/background-parsing-task.cc
index 5df46c82b9..83075c1eec 100644
--- a/deps/v8/src/background-parsing-task.cc
+++ b/deps/v8/src/background-parsing-task.cc
@@ -3,11 +3,19 @@
// found in the LICENSE file.
#include "src/background-parsing-task.h"
+
#include "src/debug/debug.h"
+#include "src/parsing/parser.h"
namespace v8 {
namespace internal {
+void StreamedSource::Release() {
+ parser.reset();
+ info.reset();
+ zone.reset();
+}
+
BackgroundParsingTask::BackgroundParsingTask(
StreamedSource* source, ScriptCompiler::CompileOptions options,
int stack_size, Isolate* isolate)
@@ -42,9 +50,8 @@ BackgroundParsingTask::BackgroundParsingTask(
// Parser needs to stay alive for finalizing the parsing on the main
// thread.
source_->parser.reset(new Parser(source_->info.get()));
- source_->parser->DeserializeScopeChain(
- source_->info.get(), Handle<Context>::null(),
- Scope::DeserializationMode::kDeserializeOffHeap);
+ source_->parser->DeserializeScopeChain(source_->info.get(),
+ MaybeHandle<ScopeInfo>());
}
@@ -55,8 +62,7 @@ void BackgroundParsingTask::Run() {
// Reset the stack limit of the parser to reflect correctly that we're on a
// background thread.
- uintptr_t stack_limit =
- reinterpret_cast<uintptr_t>(&stack_limit) - stack_size_ * KB;
+ uintptr_t stack_limit = GetCurrentStackPosition() - stack_size_ * KB;
source_->parser->set_stack_limit(stack_limit);
// Nullify the Isolate temporarily so that the background parser doesn't