Index: src/parsing/parse-info.h |
diff --git a/src/parsing/parse-info.h b/src/parsing/parse-info.h |
index b3f47692a19da613363e8220abf74c69903c33eb..83b7f79f5fbc8f84bf150ac5b9e2cb1ffbc0dafb 100644 |
--- a/src/parsing/parse-info.h |
+++ b/src/parsing/parse-info.h |
@@ -22,6 +22,7 @@ class AccountingAllocator; |
class AstRawString; |
class AstValueFactory; |
class DeclarationScope; |
+class DeferredHandles; |
class FunctionLiteral; |
class ScriptData; |
class SharedFunctionInfo; |
@@ -45,6 +46,12 @@ class V8_EXPORT_PRIVATE ParseInfo { |
std::shared_ptr<Zone> zone_shared() const { return zone_; } |
+ void set_deferred_handles(std::shared_ptr<DeferredHandles> deferred_handles); |
+ void set_deferred_handles(DeferredHandles* deferred_handles); |
+ std::shared_ptr<DeferredHandles> deferred_handles() const { |
+ return deferred_handles_; |
+ } |
+ |
// Convenience accessor methods for flags. |
#define FLAG_ACCESSOR(flag, getter, setter) \ |
bool getter() const { return GetFlag(flag); } \ |
@@ -201,8 +208,12 @@ class V8_EXPORT_PRIVATE ParseInfo { |
} |
void ReopenHandlesInNewHandleScope() { |
- shared_ = Handle<SharedFunctionInfo>(*shared_); |
- script_ = Handle<Script>(*script_); |
+ if (!script_.is_null()) { |
+ script_ = Handle<Script>(*script_); |
+ } |
+ if (!shared_.is_null()) { |
+ shared_ = Handle<SharedFunctionInfo>(*shared_); |
+ } |
Handle<ScopeInfo> outer_scope_info; |
if (maybe_outer_scope_info_.ToHandle(&outer_scope_info)) { |
maybe_outer_scope_info_ = Handle<ScopeInfo>(*outer_scope_info); |
@@ -266,6 +277,7 @@ class V8_EXPORT_PRIVATE ParseInfo { |
//----------- Output of parsing and scope analysis ------------------------ |
FunctionLiteral* literal_; |
+ std::shared_ptr<DeferredHandles> deferred_handles_; |
void SetFlag(Flag f) { flags_ |= f; } |
void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |