Skip to content

Commit

Permalink
Don't immediately type-check when converting a v8::Value into a Scrip…
Browse files Browse the repository at this point in the history
…tPromise<>

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 <[email protected]>
Reviewed-by: Andrey Kosyakov <[email protected]>
Auto-Submit: Nate Chapin <[email protected]>
Commit-Queue: Maks Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1364916}
  • Loading branch information
natechapin authored and chromium-wpt-export-bot committed Oct 7, 2024
1 parent b3d2e16 commit 290c27a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fledge/tentative/auction-config.https.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
});

Expand Down

0 comments on commit 290c27a

Please sign in to comment.