Skip to content

fix(engine): return null from IsHTMLDDA [[Call]] per Annex B §B.3.6.1 - #5511

Merged
jedel1043 merged 1 commit into
boa-dev:mainfrom
xcb3d:fix/is-html-dda-call-null
Sep 6, 2026
Merged

fix(engine): return null from IsHTMLDDA [[Call]] per Annex B §B.3.6.1#5511
jedel1043 merged 1 commit into
boa-dev:mainfrom
xcb3d:fix/is-html-dda-call-null

Conversation

@xcb3d

@xcb3d xcb3d commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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.IsHTMLDDA and document.all) must return null when called with no arguments or with an empty string.

It changes the following:

  • Change is_html_dda_call in core/engine/src/builtins/is_html_dda.rs to return JsValue::null() instead of JsValue::undefined().
  • Update doc comments to cite Annex B §B.3.6.1.
  • Resolves all 6 failing test262 tests in test/annexB/built-ins/String/prototype/ (replace, replaceAll, match, matchAll, split, search custom-*-emulates-undefined.js), bringing the suite to 100% conformance (111/111 passed).

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).
@xcb3d
xcb3d requested a review from a team as a code owner September 6, 2026 15:07
@github-actions github-actions Bot added Waiting On Review Waiting on reviews from the maintainers C-Builtins PRs and Issues related to builtins/intrinsics labels Sep 6, 2026
@github-actions github-actions Bot added this to the v0.23 milestone Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,578 53,578 0
Passed 51,426 51,432 +6
Ignored 1,648 1,648 0
Failed 504 498 -6
Panics 0 0 0
Conformance 95.98% 95.99% +0.01%
Fixed tests (6):
test/annexB/built-ins/String/prototype/split/custom-splitter-emulates-undefined.js (previously Failed)
test/annexB/built-ins/String/prototype/replaceAll/custom-replacer-emulates-undefined.js (previously Failed)
test/annexB/built-ins/String/prototype/search/custom-searcher-emulates-undefined.js (previously Failed)
test/annexB/built-ins/String/prototype/replace/custom-replacer-emulates-undefined.js (previously Failed)
test/annexB/built-ins/String/prototype/matchAll/custom-matcher-emulates-undefined.js (previously Failed)
test/annexB/built-ins/String/prototype/match/custom-matcher-emulates-undefined.js (previously Failed)

Tested main commit: 4b61183443403997a98da829dae287ce10358e1c
Tested PR commit: ac1a379d483adfbf63188b17ad46b2d7a17a6b7c
Compare commits: 4b61183...ac1a379

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.89%. Comparing base (6ddc2b4) to head (ac1a379).
⚠️ Report is 1051 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jedel1043 jedel1043 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@jedel1043
jedel1043 added this pull request to the merge queue Sep 6, 2026
Merged via the queue into boa-dev:main with commit 257bc30 Sep 6, 2026
22 checks passed
@github-actions github-actions Bot removed the Waiting On Review Waiting on reviews from the maintainers label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Builtins PRs and Issues related to builtins/intrinsics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants