Skip to content

fix: Error subclass conformance improvements#520

Open
telecos wants to merge 1 commit intomainfrom
fix/error-conformance
Open

fix: Error subclass conformance improvements#520
telecos wants to merge 1 commit intomainfrom
fix/error-conformance

Conversation

@telecos
Copy link
Owner

@telecos telecos commented Mar 16, 2026

Fixes Error subclass conformance issues for Test262.

Changes:

  • AggregateError: store raw JsValues in errors field per spec 20.5.7.1 instead of wrapping non-Error values in JsError objects
  • Error.captureStackTrace: handle PlainObject targets by adding .stack property and return undefined per V8 API contract
  • Updated JsError.errors type from Vec of Rc JsError to Vec of JsValue
  • All existing conformance (Error.prototype.constructor, name, message defaults, instanceof via hasInstance) verified correct

Validation: cargo check, clippy, fmt all clean

- AggregateError: store raw JsValues in errors field (§20.5.7.1)
  instead of wrapping non-Error values in JsError objects
- Error.captureStackTrace: handle PlainObject targets by adding
  .stack property; return undefined per V8 API contract
- Update JsError.errors type from Vec<Rc<JsError>> to Vec<JsValue>
- Update all call sites, tests, and doc comments

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@telecos telecos force-pushed the fix/error-conformance branch from e5b5a18 to e8cf252 Compare March 16, 2026 01:38
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 46.66667% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/stator_core/src/builtins/install_globals.rs 5.88% 16 Missing ⚠️

📢 Thoughts on this report? Let us know!

@telecos telecos force-pushed the main branch 8 times, most recently from 4989935 to a4d7c2c Compare March 24, 2026 15:59
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.

1 participant