Index: src/parsing/parse-info.cc |
diff --git a/src/parsing/parse-info.cc b/src/parsing/parse-info.cc |
index 487c36702c9743ddffef33760c1e381b0e3867a3..d3cf86dbdff8050e527230cdb079d538950e847e 100644 |
--- a/src/parsing/parse-info.cc |
+++ b/src/parsing/parse-info.cc |
@@ -4,6 +4,7 @@ |
#include "src/parsing/parse-info.h" |
+#include "src/api.h" |
#include "src/ast/ast-value-factory.h" |
#include "src/ast/ast.h" |
#include "src/heap/heap-inl.h" |
@@ -36,7 +37,8 @@ ParseInfo::ParseInfo(AccountingAllocator* zone_allocator) |
cached_data_(nullptr), |
ast_value_factory_(nullptr), |
function_name_(nullptr), |
- literal_(nullptr) {} |
+ literal_(nullptr), |
+ deferred_handles_(nullptr) {} |
ParseInfo::ParseInfo(Handle<SharedFunctionInfo> shared) |
: ParseInfo(shared->GetIsolate()->allocator()) { |
@@ -108,6 +110,17 @@ FunctionKind ParseInfo::function_kind() const { |
return SharedFunctionInfo::FunctionKindBits::decode(compiler_hints_); |
} |
+void ParseInfo::set_deferred_handles( |
+ std::shared_ptr<DeferredHandles> deferred_handles) { |
+ DCHECK(deferred_handles_.get() == nullptr); |
+ deferred_handles_.swap(deferred_handles); |
+} |
+ |
+void ParseInfo::set_deferred_handles(DeferredHandles* deferred_handles) { |
+ DCHECK(deferred_handles_.get() == nullptr); |
+ deferred_handles_.reset(deferred_handles); |
+} |
+ |
#ifdef DEBUG |
bool ParseInfo::script_is_native() const { |
return script_->type() == Script::TYPE_NATIVE; |