diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 6e61e2af999906..2d1765b4319c7e 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 7 #define V8_MINOR_VERSION 8 #define V8_BUILD_NUMBER 279 -#define V8_PATCH_LEVEL 9 +#define V8_PATCH_LEVEL 10 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/codegen/compiler.cc b/deps/v8/src/codegen/compiler.cc index 3a8ab3398aabf3..fbd181f5c8eeb1 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;