Skip to content

fix(jsproxy): convert panics to EngineError::Panic using js_expect#4854

Merged
nekevss merged 3 commits intoboa-dev:mainfrom
KaustubhOG:fix/convert-panics-jsproxy
Mar 4, 2026
Merged

fix(jsproxy): convert panics to EngineError::Panic using js_expect#4854
nekevss merged 3 commits intoboa-dev:mainfrom
KaustubhOG:fix/convert-panics-jsproxy

Conversation

@KaustubhOG
Copy link
Copy Markdown
Contributor

Part of #3241

Converts all 13 panics in jsproxy.rs to EngineError::Panic using
js_expect introduced in #4828.

build() and build_revocable() return types changed from JsProxy/
JsRevocableProxy to JsResult<JsProxy>/JsResult<JsRevocableProxy>.
Checked for external callers —> only a type re-export in mod.rs, so
the cascade is limited to 1 file.

Note: The two JsNativeError::typ() usages in from_object() and
TryFromJs are intentionally left unchanged (becauze i think these are correct
user-facing TypeErrors, not internal implementation failures.)

@KaustubhOG KaustubhOG requested a review from a team as a code owner March 4, 2026 11:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,862 52,862 0
Passed 49,627 49,627 0
Ignored 2,263 2,263 0
Failed 972 972 0
Panics 0 0 0
Conformance 93.88% 93.88% 0.00%

Tested PR commit: 7605f9f090ea4c5fb8405946bd2f329c466b20d3

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.13%. Comparing base (6ddc2b4) to head (7605f9f).
⚠️ Report is 756 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/object/builtins/jsproxy.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4854      +/-   ##
==========================================
+ Coverage   47.24%   57.13%   +9.89%     
==========================================
  Files         476      554      +78     
  Lines       46892    60467   +13575     
==========================================
+ Hits        22154    34550   +12396     
- Misses      24738    25917    +1179     

☔ 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.

@nekevss nekevss added this pull request to the merge queue Mar 4, 2026
Merged via the queue into boa-dev:main with commit 75c0a75 Mar 4, 2026
19 checks passed
ashddev pushed a commit to ashddev/boa that referenced this pull request Mar 4, 2026
…oa-dev#4854)

Part of boa-dev#3241

Converts all 13 panics in `jsproxy.rs` to `EngineError::Panic` using
`js_expect` introduced in boa-dev#4828.

`build()` and `build_revocable()` return types changed from `JsProxy`/
`JsRevocableProxy` to `JsResult<JsProxy>`/`JsResult<JsRevocableProxy>`.
Checked for external callers —> only a type re-export in `mod.rs`, so
the cascade is limited to 1 file.

Note: The two `JsNativeError::typ()` usages in `from_object()` and
`TryFromJs` are intentionally left unchanged (becauze i think these are
correct
user-facing TypeErrors, not internal implementation failures.)
@jedel1043 jedel1043 added A-Technical Debt Changes related to technical debt A-Internal Changes that don't modify execution behaviour labels Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Internal Changes that don't modify execution behaviour A-Technical Debt Changes related to technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants