Commit f12b193d authored by Wiktor Garbacz's avatar Wiktor Garbacz Committed by Commit Bot

Make isolate explicit param of ParseHandleScope ctor

A step towards removing isolate from ParseInfo.
Removing isolate from ParseInfo will make it easier to create and
execute parse tasks on background threads.

BUG=v8:6093

Change-Id: I2a3a8a02d791d7ae6acc2243e2f430defc3be5ea
Reviewed-on: https://chromium-review.googlesource.com/458002
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: 's avatarDaniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44097}
parent 1ef7fcad
...@@ -44,8 +44,8 @@ namespace internal { ...@@ -44,8 +44,8 @@ namespace internal {
// underlying DeferredHandleScope and stores them in info_ on destruction. // underlying DeferredHandleScope and stores them in info_ on destruction.
class ParseHandleScope final { class ParseHandleScope final {
public: public:
explicit ParseHandleScope(ParseInfo* info) explicit ParseHandleScope(ParseInfo* info, Isolate* isolate)
: deferred_(info->isolate()), info_(info) {} : deferred_(isolate), info_(info) {}
~ParseHandleScope() { info_->set_deferred_handles(deferred_.Detach()); } ~ParseHandleScope() { info_->set_deferred_handles(deferred_.Detach()); }
private: private:
...@@ -682,7 +682,7 @@ MUST_USE_RESULT MaybeHandle<Code> GetUnoptimizedCode( ...@@ -682,7 +682,7 @@ MUST_USE_RESULT MaybeHandle<Code> GetUnoptimizedCode(
} }
if (inner_function_mode == Compiler::CONCURRENT) { if (inner_function_mode == Compiler::CONCURRENT) {
ParseHandleScope parse_handles(info->parse_info()); ParseHandleScope parse_handles(info->parse_info(), info->isolate());
info->parse_info()->ReopenHandlesInNewHandleScope(); info->parse_info()->ReopenHandlesInNewHandleScope();
info->parse_info()->ast_value_factory()->Internalize(info->isolate()); info->parse_info()->ast_value_factory()->Internalize(info->isolate());
} }
...@@ -1211,7 +1211,7 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { ...@@ -1211,7 +1211,7 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
} }
{ {
ParseHandleScope parse_handles(parse_info); ParseHandleScope parse_handles(parse_info, info->isolate());
parse_info->ReopenHandlesInNewHandleScope(); parse_info->ReopenHandlesInNewHandleScope();
parse_info->ast_value_factory()->Internalize(info->isolate()); parse_info->ast_value_factory()->Internalize(info->isolate());
} }
......
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