From ddfc3b0a764620515bb4c5c66445f75e865611f7 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Fri, 27 Sep 2019 14:48:05 -0400 Subject: deps: patch V8 to 7.8.279.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/v8/v8/compare/7.8.279.9...7.8.279.10 PR-URL: https://github.com/nodejs/node/pull/29694 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Gus Caplan Reviewed-By: Jiawen Geng Reviewed-By: Michaël Zasso Reviewed-By: Tobias Nießen Reviewed-By: Ujjwal Sharma --- deps/v8/src/codegen/compiler.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'deps/v8/src') diff --git a/deps/v8/src/codegen/compiler.cc b/deps/v8/src/codegen/compiler.cc index 3a8ab3398a..fbd181f5c8 100644 --- a/deps/v8/src/codegen/compiler.cc +++ b/deps/v8/src/codegen/compiler.cc @@ -2234,18 +2234,22 @@ Handle Compiler::GetSharedFunctionInfo( // this function, replace the uncompiled data with one that includes it. if (literal->produced_preparse_data() != nullptr && existing->HasUncompiledDataWithoutPreparseData()) { - DCHECK(literal->inferred_name()->Equals( - existing->uncompiled_data().inferred_name())); + Handle existing_uncompiled_data = + handle(existing->uncompiled_data(), isolate); DCHECK_EQ(literal->start_position(), - existing->uncompiled_data().start_position()); + existing_uncompiled_data->start_position()); DCHECK_EQ(literal->end_position(), - existing->uncompiled_data().end_position()); + existing_uncompiled_data->end_position()); + // Use existing uncompiled data's inferred name as it may be more + // accurate than the literal we preparsed. + Handle inferred_name = + handle(existing_uncompiled_data->inferred_name(), isolate); Handle preparse_data = literal->produced_preparse_data()->Serialize(isolate); Handle new_uncompiled_data = isolate->factory()->NewUncompiledDataWithPreparseData( - literal->inferred_name(), literal->start_position(), - literal->end_position(), preparse_data); + inferred_name, existing_uncompiled_data->start_position(), + existing_uncompiled_data->end_position(), preparse_data); existing->set_uncompiled_data(*new_uncompiled_data); } return existing; -- cgit v1.2.3