script: Correctly convert a jsval to a Promise (#36403)

Fixes an oversight of #36097, in which converting to a Promise would
fail if the value passed wasn't actually a Promise, while in binding
code we actually call `Promise::new_resolved` on the value.

Testing: There are wpt tests that should pass now

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-04-09 18:35:35 +02:00 committed by GitHub
parent 3b41a16fcf
commit 64b401696a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View file

@ -2,9 +2,6 @@
[ClipboardItem({string, Blob}) succeeds with different types]
expected: FAIL
[ClipboardItem() succeeds with empty options]
expected: FAIL
[types() returns correct values]
expected: FAIL