diff --git a/common.gypi b/common.gypi index 414d4ea32ce19b..22ddea26774b22 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.43', + 'v8_embedder_string': '-node.44', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/interpreter/bytecode-generator.cc b/deps/v8/src/interpreter/bytecode-generator.cc index 4a1c045927e733..26ec1600278cdb 100644 --- a/deps/v8/src/interpreter/bytecode-generator.cc +++ b/deps/v8/src/interpreter/bytecode-generator.cc @@ -4891,8 +4891,9 @@ void BytecodeGenerator::VisitCall(Call* expr) { Property* property = chain->expression()->AsProperty(); BuildOptionalChain([&]() { VisitAndPushIntoRegisterList(property->obj(), &args); - VisitPropertyLoadForRegister(args.last_register(), property, callee); + VisitPropertyLoad(args.last_register(), property); }); + builder()->StoreAccumulatorInRegister(callee); break; } case Call::SUPER_CALL: diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-1038178.js b/deps/v8/test/mjsunit/regress/regress-crbug-1038178.js index 0362f69bcda3ad..3a84066b837d51 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-1038178.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-1038178.js @@ -15,7 +15,7 @@ function opt(){ (((function(){})())?.v)() } %PrepareFunctionForOptimization(opt) -assertThrows(opt()); -assertThrows(opt()); +assertThrows(() => opt()); +assertThrows(() => opt()); %OptimizeFunctionOnNextCall(opt) -assertThrows(opt()); +assertThrows(() => opt()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-1171954.js b/deps/v8/test/mjsunit/regress/regress-crbug-1171954.js new file mode 100644 index 00000000000000..94fbb329bc47b4 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-1171954.js @@ -0,0 +1,19 @@ +// Copyright 2021 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --always-opt + +// This causes the register used by the call in the later try-catch block to be +// used by the ToName conversion for null which causes a DCHECK fail when +// compiling. If register allocation changes, this test may no longer reproduce +// the crash but it is not easy write a proper test because it is linked to +// register allocation. This test should always work, so shouldn't cause any +// flakes. +try { + var { [null]: __v_12, } = {}; +} catch (e) {} + +try { + assertEquals((__v_40?.o?.m)().p); +} catch (e) {}