fix(module/source.rs,namespace.rs,synthetic.rs): convert panics to EngineError::Panic using js_expect#5064
Conversation
Test262 conformance changes
Tested main commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5064 +/- ##
===========================================
+ Coverage 47.24% 58.98% +11.73%
===========================================
Files 476 563 +87
Lines 46892 62569 +15677
===========================================
+ Hits 22154 36905 +14751
- Misses 24738 25664 +926 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Remaining
All remaining panics fall into: spec-mandated assert invariants, module state machine invariants, %Promise% intrinsic guarantees, compile-time constant |
|
Uh I'd argue these kind of state transition steps should also be engine panics, since those have the highest probability of being incorrect Also, I think I've mentioned the spec might also have bugs, so it is safer to engine panic on spec assertions. |
Yup , just saw yours comment on the 5063 , will convert the statetranstions and spec assertions ones . |

Part of #3241. It changes the following:
core/engine/src/module/source.rs: converted 24 panics to usejs_expect.core/engine/src/module/namespace.rs: converted 11 panics to usejs_expect.core/engine/src/module/synthetic.rs: converted 4 panics to usejs_expect.This completes all real panics in
module/. The remaining.expect()calls inmodule/are either in non-JsResultfunctions (load(),inner_load(),load_link_evaluate(),link(),execute_async()), insidedebug_assert!blocks, or in#[cfg(test)]blocks and are left as-is.