Add Error.cause support#249
Conversation
- Install `cause` on `Error` and `AggregateError` when present in options - Add end-to-end coverage for value types, property attributes, and inheritance
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new test suite for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Benchmark Results274 benchmarks Interpreted: 🟢 224 improved · 🔴 15 regressed · 35 unchanged · avg +6.7% arraybuffer.js — Interp: 🟢 14 · avg +9.3% · Bytecode: 🔴 14 · avg -13.3%
arrays.js — Interp: 🟢 19 · avg +10.5% · Bytecode: 🔴 19 · avg -12.5%
async-await.js — Interp: 🟢 6 · avg +9.9% · Bytecode: 🔴 6 · avg -12.3%
classes.js — Interp: 🟢 31 · avg +13.2% · Bytecode: 🔴 25, 6 unch. · avg -10.3%
closures.js — Interp: 🟢 11 · avg +9.7% · Bytecode: 🔴 9, 2 unch. · avg -7.0%
collections.js — Interp: 🟢 12 · avg +14.7% · Bytecode: 🔴 12 · avg -14.2%
destructuring.js — Interp: 🟢 22 · avg +9.7% · Bytecode: 🔴 22 · avg -11.6%
fibonacci.js — Interp: 🟢 8 · avg +7.0% · Bytecode: 🔴 8 · avg -12.9%
for-of.js — Interp: 🟢 7 · avg +2.3% · Bytecode: 🔴 7 · avg -9.4%
helpers/bench-module.js — Interp: 0 · Bytecode: 0
iterators.js — Interp: 🟢 15, 5 unch. · avg +2.1% · Bytecode: 🔴 20 · avg -10.6%
json.js — Interp: 🟢 19, 1 unch. · avg +9.5% · Bytecode: 🔴 20 · avg -12.8%
jsx.jsx — Interp: 🟢 16, 5 unch. · avg +2.8% · Bytecode: 🟢 1, 🔴 15, 5 unch. · avg -3.6%
modules.js — Interp: 🟢 8, 1 unch. · avg +2.7% · Bytecode: 🔴 9 · avg -8.5%
numbers.js — Interp: 🟢 10, 1 unch. · avg +6.2% · Bytecode: 🔴 10, 1 unch. · avg -15.7%
objects.js — Interp: 🟢 4, 🔴 1, 2 unch. · avg +1.6% · Bytecode: 🔴 4, 3 unch. · avg -3.5%
promises.js — Interp: 🟢 3, 🔴 1, 8 unch. · avg +0.3% · Bytecode: 🔴 11, 1 unch. · avg -6.9%
regexp.js — Interp: 🟢 7, 🔴 2, 2 unch. · avg +2.2% · Bytecode: 🔴 11 · avg -8.8%
strings.js — Interp: 🟢 3, 🔴 4, 4 unch. · avg -0.3% · Bytecode: 🔴 9, 2 unch. · avg -6.2%
typed-arrays.js — Interp: 🟢 9, 🔴 7, 6 unch. · avg +2.2% · Bytecode: 🔴 21, 1 unch. · avg -10.5%
Measured on ubuntu-latest x64. Benchmark ranges compare cached main-branch min/max ops/sec with the PR run; overlapping ranges are treated as unchanged noise. Percentage deltas are secondary context. |
Suite Timing
Measured on ubuntu-latest x64. |
Summary
causeoption onErrorandAggregateErrorconstructors.HasProperty-based detection so inherited and accessorcausevalues are handled correctly.causeas a non-enumerable, writable, configurable data property to match the spec.AggregateError.Testing
tests/built-ins/Error/cause.jscovering happy paths and edge cases.units/Goccia.Builtins.Globals.pasto installcausevia property descriptors forErrorandAggregateError.