Skip to content

fix(jspromise): convert panics to EngineError::Panic using js_expect#4875

Merged
nekevss merged 1 commit intoboa-dev:mainfrom
KaustubhOG:fix/convert-panics-jspromise
Mar 5, 2026
Merged

fix(jspromise): convert panics to EngineError::Panic using js_expect#4875
nekevss merged 1 commit intoboa-dev:mainfrom
KaustubhOG:fix/convert-panics-jspromise

Conversation

@KaustubhOG
Copy link
Copy Markdown
Contributor

Part of #3241

Converts all 23 panics in jspromise.rs to EngineError::Panic using
js_expect introduced in #4828.

Patterns converted:

  • .js_expect() on internal promise operations that cannot fail
  • .js_expect().map_err(Into::into) for methods returning JsResult<JsPromise>

Signature changes:

  • resolve(), reject(), from_result()JsResult<Self>
  • then(), catch(), finally()JsResult<JsPromise>
  • all(), all_settled(), any(), race()JsResult<JsPromise>
  • into_js_future()JsResult<JsFuture>

Files modified: 6

@KaustubhOG KaustubhOG requested a review from a team as a code owner March 5, 2026 13:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,666 49,666 0
Ignored 2,284 2,284 0
Failed 1,013 1,013 0
Panics 0 0 0
Conformance 93.77% 93.77% 0.00%

Tested main commit: faaf64d6af04ed7691edac6cae7dc9d1bc38a8f8
Tested PR commit: 68d6bf40209169d5f8cf6a6b71a2a5f48e9e1f16
Compare commits: faaf64d...68d6bf4

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

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

Files with missing lines Patch % Lines
core/engine/src/object/builtins/jspromise.rs 10.34% 26 Missing ⚠️
core/engine/src/builtins/array/from_async.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4875      +/-   ##
==========================================
+ Coverage   47.24%   57.13%   +9.88%     
==========================================
  Files         476      555      +79     
  Lines       46892    60600   +13708     
==========================================
+ Hits        22154    34623   +12469     
- Misses      24738    25977    +1239     

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

Copy link
Copy Markdown
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

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

Great work! Thanks! :)

@nekevss nekevss added this pull request to the merge queue Mar 5, 2026
Merged via the queue into boa-dev:main with commit 3d8ca6a Mar 5, 2026
19 checks passed
@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.

4 participants