diff --git a/common.gypi b/common.gypi index cbe454d9bb0bed..90f48604f31ddd 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,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.13', + 'v8_embedder_string': '-node.14', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/builtins/builtins-async-disposable-stack.cc b/deps/v8/src/builtins/builtins-async-disposable-stack.cc index 226184d9d5497a..e1f0ee792c6665 100644 --- a/deps/v8/src/builtins/builtins-async-disposable-stack.cc +++ b/deps/v8/src/builtins/builtins-async-disposable-stack.cc @@ -89,10 +89,6 @@ BUILTIN(AsyncDisposeFromSyncDispose) { kMethod))), isolate); - v8::TryCatch try_catch(reinterpret_cast(isolate)); - try_catch.SetVerbose(false); - try_catch.SetCaptureMessage(false); - MaybeDirectHandle result = Execution::Call(isolate, sync_method, receiver, {}); @@ -107,7 +103,8 @@ BUILTIN(AsyncDisposeFromSyncDispose) { return {}; } // d. IfAbruptRejectPromise(result, promiseCapability). - DCHECK(try_catch.HasCaught()); + isolate->clear_internal_exception(); + isolate->clear_pending_message(); JSPromise::Reject(promise, direct_handle(exception, isolate)); } diff --git a/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt b/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt index a0172dc2494fe5..2e649ddb8fa5b8 100644 --- a/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt +++ b/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt @@ -1133,7 +1133,7 @@ Correctly predicted as caught Running test: testCase > Throwing from throwInAsyncDisposeFormSync, handling with dontHandleAsync -Paused on caught exception +Paused on uncaught promiseRejection [Symbol.dispose] (catch-prediction.js:188:6) throwInAsyncDisposeFormSync (catch-prediction.js:185:18) dontHandleAsync (catch-prediction.js:196:8) @@ -1171,7 +1171,7 @@ Correctly predicted as uncaught Running test: testCase > Throwing from throwInAsyncDisposeFormSync, handling with awaitAndCreateInTry -Paused on caught exception +Paused on caught promiseRejection [Symbol.dispose] (catch-prediction.js:188:6) throwInAsyncDisposeFormSync (catch-prediction.js:185:18) awaitAndCreateInTry (catch-prediction.js:202:10) diff --git a/deps/v8/test/mjsunit/harmony/regress/regress-418103036.js b/deps/v8/test/mjsunit/harmony/regress/regress-418103036.js new file mode 100644 index 00000000000000..537bd9d0a918d3 --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/regress/regress-418103036.js @@ -0,0 +1,26 @@ +// Copyright 2025 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: --ignore-unhandled-promises + +const obj = { + get f() { + async function f() { + function g() { + throw 1; + } + g[Symbol.dispose] = g; + await using y = g; + } + return f(); + }, +}; + +async function test(obj) { + const ser = d8.serializer.serialize(obj); + const des = d8.serializer.deserialize(ser); + await des; +} + +assertThrowsAsync(test(obj), Error);