Skip to content

Commit

Permalink
Bug 1916801 [wpt PR 47969] - [wpt] Fix null-handling in equals JS S…
Browse files Browse the repository at this point in the history
…tring Builtins, a=testonly

Automatic update from web-platform-tests
[wpt] Fix null-handling in `equals` JS String Builtins

Equals specifically allows null inputs. Update the JS API
tests and the polyfill to match, and remove expectations files
now that the `basic` tests pass.

The test changes are mirrored in an upstream PR:
WebAssembly/js-string-builtins#43

Bug: 42204114
Change-Id: I170f7e26e80033844a1d3e95fbe998d5f64f4a47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5836264
Reviewed-by: Rezvan Mahdavi Hezaveh <rezvanchromium.org>
Commit-Queue: Adam Klein <adamkchromium.org>
Cr-Commit-Position: refs/heads/main{#1350946}

--

wpt-commits: f427091001d8e21333c4a7ed1bfa10379f1f767d
wpt-pr: 47969

UltraBlame original commit: b18d279f4aa8fe1f9f1620b57282557fa43fd884
  • Loading branch information
marco-c committed Sep 16, 2024
1 parent c2ae93b commit f92d36e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,10 @@ error
=
null
shouldThrow
"
shouldThrow
mismatch
"
)
;
if
Expand Down Expand Up @@ -1466,6 +1470,13 @@ equals
a
a
)
a
!
=
=
null
&
&
!
isString
WebAssembly
Expand Down
16 changes: 16 additions & 0 deletions testing/web-platform/tests/wasm/jsapi/js-string/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -868,11 +868,27 @@ stringB
=
>
{
if
(
stringA
!
=
=
null
)
throwIfNotString
(
stringA
)
;
if
(
stringB
!
=
=
null
)
throwIfNotString
(
stringB
Expand Down

0 comments on commit f92d36e

Please sign in to comment.