Use @isUndefinedOrNull instead of abstract equality with null
Created attachment 397430 [details]
Comment on attachment 397430 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=397430&action=review
r=me with comment.
> + b) Replaces 3 `!= @undefined` and 7 `!= null` comparisons with @isUndefinedOrNull()
> + as only the latter is correct with [[IsHTMLDDA]] aka MasqueradesAsUndefined objects .
Can you add a test with IsHTMLDDA? jsc shell has IsHTMLDDA mechanism so we can write a test for MasqueradesAsUndefined with JSC shell.
Created attachment 399669 [details]
Rebase JSTests/test262/expectations.yaml and set reviewer.
(In reply to Yusuke Suzuki from comment #2)
> Can you add a test with IsHTMLDDA? jsc shell has IsHTMLDDA mechanism so we
> can write a test for MasqueradesAsUndefined with JSC shell.
I've added test262 coverage for all the comparisons fixed by this patch (r259587 introduced proper $262.IsHTMLDDA).
These tests will be also beneficial for non-mainstream engines like Hermes, which, judging by source code
may have the same bug.
Comment on attachment 399669 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=399669&action=review
This test is wrong. Upstream fix: https://github.com/tc39/test262/pull/2626.
Committed r262017: <https://trac.webkit.org/changeset/262017>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 399669 [details].