Use @isUndefinedOrNull instead of abstract equality with null
Created attachment 397430 [details] Patch
Comment on attachment 397430 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397430&action=review r=me with comment. > Source/JavaScriptCore/ChangeLog:14 > + b) Replaces 3 `!= @undefined` and 7 `!= null` comparisons with @isUndefinedOrNull() > + as only the latter is correct with [[IsHTMLDDA]] aka MasqueradesAsUndefined objects [2]. 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] Patch 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 (https://github.com/facebook/hermes/blob/b6530ae7e25604839c33b60261fb2832f49ca464/lib/InternalBytecode/String.js#L673), may have the same bug.
Comment on attachment 399669 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399669&action=review > JSTests/test262/expectations.yaml:11 > test/annexB/built-ins/String/prototype/replaceAll/custom-replacer-emulates-undefined.js: 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].
<rdar://problem/63502823>