From 290c27a84c2e630458687e757555dfe88b0cefc0 Mon Sep 17 00:00:00 2001 From: Nate Chapin Date: Mon, 7 Oct 2024 07:45:33 -0700 Subject: [PATCH] Don't immediately type-check when converting a v8::Value into a ScriptPromise<> Typed promises in the generated bindings were introduced in https://chromium-review.googlesource.com/c/chromium/src/+/5381805. That CL converted to a rejected promise when the input value wasn't a promise and was the wrong type. This reverts to the old behavior of unconditionally wrapping the value in a resolved promise, and handling type checking in the reaction. Change-Id: I6c875be415bf62f2e7fdb9d1150f8deae5be0032 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5908893 Reviewed-by: Maks Orlovich Reviewed-by: Andrey Kosyakov Auto-Submit: Nate Chapin Commit-Queue: Maks Orlovich Cr-Commit-Position: refs/heads/main@{#1364916} --- fledge/tentative/auction-config.https.window.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fledge/tentative/auction-config.https.window.js b/fledge/tentative/auction-config.https.window.js index fc1441a8743001..1b2eba36169271 100644 --- a/fledge/tentative/auction-config.https.window.js +++ b/fledge/tentative/auction-config.https.window.js @@ -475,10 +475,7 @@ makeTest({ makeTest({ name: 'perBuyerCurrencies not convertible to dictionary', expect: EXPECT_PROMISE_ERROR, - // Because this is not convertible by IDL to the proper dictionary type, this - // will immediately be converted to a rejected promise inside of the - // runBasicFledgeAuction() invocation, and that await will handle the - // rejection. Therefore, no expectPromiseError. + expectPromiseError: EXPECT_EXCEPTION(TypeError), auctionConfigOverrides: {perBuyerCurrencies: 123} });