From f12b193df9134ba3a1ef565a8c799f19060205af Mon Sep 17 00:00:00 2001 From: Wiktor Garbacz Date: Wed, 22 Mar 2017 15:52:19 +0100 Subject: [PATCH] Make isolate explicit param of ParseHandleScope ctor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel Vogelheim Reviewed-by: Marja Hölttä Cr-Commit-Position: refs/heads/master@{#44097} --- src/compiler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler.cc b/src/compiler.cc index 54fb88df67..e0346d7ad4 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -44,8 +44,8 @@ namespace internal { // underlying DeferredHandleScope and stores them in info_ on destruction. class ParseHandleScope final { public: - explicit ParseHandleScope(ParseInfo* info) - : deferred_(info->isolate()), info_(info) {} + explicit ParseHandleScope(ParseInfo* info, Isolate* isolate) + : deferred_(isolate), info_(info) {} ~ParseHandleScope() { info_->set_deferred_handles(deferred_.Detach()); } private: @@ -682,7 +682,7 @@ MUST_USE_RESULT MaybeHandle GetUnoptimizedCode( } 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()->ast_value_factory()->Internalize(info->isolate()); } @@ -1211,7 +1211,7 @@ Handle CompileToplevel(CompilationInfo* info) { } { - ParseHandleScope parse_handles(parse_info); + ParseHandleScope parse_handles(parse_info, info->isolate()); parse_info->ReopenHandlesInNewHandleScope(); parse_info->ast_value_factory()->Internalize(info->isolate()); }