Skip to content

fixed show ArrayBuffer constructor as [Function: ArrayBuffer]#4935

Merged
jedel1043 merged 1 commit intoboa-dev:mainfrom
sahanaxzy:fix-arraybuffer-display-format
Mar 9, 2026
Merged

fixed show ArrayBuffer constructor as [Function: ArrayBuffer]#4935
jedel1043 merged 1 commit intoboa-dev:mainfrom
sahanaxzy:fix-arraybuffer-display-format

Conversation

@sahanaxzy
Copy link
Copy Markdown
Contributor

Summary

Fixes how constructors are shown in console/debug output so that only real class constructors use [class Name], while built-ins like ArrayBuffer use [Function: Name].

Solves #4934

Changes

Modified core/engine/src/value/display.rs

only shows [class Name] when the value is an OrdinaryFunction with is_class_constructor(); otherwise shows callables as [Function: Name].

Replace .map(...).unwrap_or(false) with .is_some_and(...) to satisfy Clippy.

@sahanaxzy sahanaxzy requested a review from a team as a code owner March 7, 2026 21:50
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,687 49,687 0
Ignored 2,262 2,262 0
Failed 1,014 1,014 0
Panics 0 0 0
Conformance 93.81% 93.81% 0.00%

Tested main commit: b3d820369072123ded8defc927405b99b9012648
Tested PR commit: df98b4932c363b5347ef03b24378f4bc56d57555
Compare commits: b3d8203...df98b49

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 29.41176% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.85%. Comparing base (6ddc2b4) to head (df98b49).
⚠️ Report is 798 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/value/display.rs 29.41% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4935       +/-   ##
===========================================
+ Coverage   47.24%   57.85%   +10.60%     
===========================================
  Files         476      556       +80     
  Lines       46892    60929    +14037     
===========================================
+ Hits        22154    35249    +13095     
- Misses      24738    25680      +942     

☔ View full report in Codecov by Sentry.
📢 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.

@sahanaxzy
Copy link
Copy Markdown
Contributor Author

@jedel1043 can you review this..

Copy link
Copy Markdown
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Nice fix!

@jedel1043 jedel1043 added this pull request to the merge queue Mar 9, 2026
Merged via the queue into boa-dev:main with commit 63ca217 Mar 9, 2026
19 checks passed
@sahanaxzy sahanaxzy deleted the fix-arraybuffer-display-format branch March 9, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants