-
-
Notifications
You must be signed in to change notification settings - Fork 587
Open
Labels
bugSomething isn't workingSomething isn't working
Description
While auditing the core engine's error handling, I found that the JsRegExp convenience wrapper relies on .expect() for internal invariants that are not strictly enforced by the type system. These can lead to host process crashes if a regression occurs in the engine.
Locations:
boa/core/engine/src/object/builtins/jsregexp.rs: Around L59–L68 (in JsRegExp::new).
boa/core/engine/src/object/builtins/jsregexp.rs: Boolean accessors (e.g., global, multiline) around L83–L108.
Proposed Fix:
Replace .expect() in JsRegExp::new with proper error propagation returning JsNativeError::internal().
Use ToBoolean semantics or explicit type checks instead of .as_boolean().expect() in accessors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working