fix(engine): return null from IsHTMLDDA [[Call]] per Annex B §B.3.6.1 - #5511
Merged
Conversation
According to ECMAScript Annex B §B.3.6.1 and test262's INTERPRETING.md, objects with the [[IsHTMLDDA]] internal slot (such as $262.IsHTMLDDA / document.all) must return null when called with no arguments or with an empty string. Previously, is_html_dda_call returned undefined, causing 6 test262 tests in test/annexB/built-ins/String/prototype/ to fail. All 6 tests now pass (100% conformance for test/annexB/built-ins/String/prototype).
Test262 conformance changes
Fixed tests (6):Tested main commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5511 +/- ##
===========================================
+ Coverage 47.24% 62.89% +15.65%
===========================================
Files 476 536 +60
Lines 46892 60286 +13394
===========================================
+ Hits 22154 37918 +15764
+ Misses 24738 22368 -2370 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request fixes the return value of
IsHTMLDDA's[[Call]]internal method.According to ECMAScript Annex B §B.3.6.1 and test262's
INTERPRETING.md, objects with the[[IsHTMLDDA]]internal slot (such as$262.IsHTMLDDAanddocument.all) must returnnullwhen called with no arguments or with an empty string.It changes the following:
is_html_dda_callincore/engine/src/builtins/is_html_dda.rsto returnJsValue::null()instead ofJsValue::undefined().test/annexB/built-ins/String/prototype/(replace,replaceAll,match,matchAll,split,searchcustom-*-emulates-undefined.js), bringing the suite to 100% conformance (111/111 passed).