Issue #2304 - Part 4 - Add xray support for the Error cause property. https://bugzilla.mozilla.org/show_bug.cgi?id=1679653

This commit is contained in:
Brian Smith 2026-03-07 01:17:18 -06:00 committed by OwnedByWuigi
commit 33c2fae0ba
3 changed files with 7 additions and 0 deletions

View file

@ -609,6 +609,11 @@ JSXrayTraits::resolveOwnProperty(JSContext* cx, const Wrapper& jsWrapper,
return true;
}
// The optional .cause property can have any value.
if (id == GetJSIDByIndex(cx, XPCJSContext::IDX_CAUSE)) {
return getOwnPropertyFromWrapperIfSafe(cx, wrapper, id, desc);
}
if (key == JSProto_AggregateError &&
id == GetJSIDByIndex(cx, XPCJSContext::IDX_ERRORS)) {
return getOwnPropertyFromWrapperIfSafe(cx, wrapper, id, desc);