diff --git a/source b/source index 588ffb597f8..37dccaa0f86 100644 --- a/source +++ b/source @@ -2764,6 +2764,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • Well-Known Intrinsic Objects, including %Array.prototype%, %Error.prototype%, + %AggregateError.prototype%, %EvalError.prototype%, %Function.prototype%, %JSON.parse%, @@ -8143,8 +8144,8 @@ interface DOMStringList {
  • Let name be ? Get(value, "name").

  • -
  • If name is not one of "Error", "EvalError", "RangeError", "ReferenceError", - "SyntaxError", "TypeError", or "URIError", then set name to "Error".

  • +
  • If name is not one of "AggregateError", "Error", "EvalError", "RangeError", + "ReferenceError", "SyntaxError", "TypeError", or "URIError", then set name to

  • Let valueMessageDesc be ? value.[[GetOwnProperty]]("message").

  • @@ -8153,8 +8154,24 @@ interface DOMStringList { IsDataDescriptor(valueMessageDesc) is false, and ? ToString(valueMessageDesc.[[Value]]) otherwise.

    +
  • Let errors be undefined.

  • + +
  • +

    If name is "AggregateError", then:

    + +
      +
    1. Let errorsDesc be ? value.[[GetOwnProperty]]("errors").

    2. + +
    3. If IsDataDescriptor(errorsDesc) is true, then set + errors to ? + StructuredSerializeInternal(errorsDesc.[[Value]], + forStorage, memory).

    4. +
    +
  • +
  • Set serialized to { [[Type]]: "Error", [[Name]]: name, - [[Message]]: message }.

  • + [[Message]]: message, [[Errors]]: errors }.

  • User agents should attach a serialized representation of any interesting accompanying @@ -8557,6 +8574,9 @@ o.myself = o;

    1. Let prototype be %Error.prototype%.

    2. +
    3. If serialized.[[Name]] is "AggregateError", then set prototype to + %AggregateError.prototype%.

    4. +
    5. If serialized.[[Name]] is "EvalError", then set prototype to %EvalError.prototype%.

    6. @@ -8575,11 +8595,11 @@ o.myself = o;
    7. If serialized.[[Name]] is "URIError", then set prototype to %URIError.prototype%.

    8. -
    9. Let message be serialized.[[Message]].

    10. -
    11. Set value to ! ObjectCreate(prototype, « [[ErrorData]] »).

    12. +
    13. Let message be serialized.[[Message]].

    14. +
    15. Let messageDesc be PropertyDescriptor{ [[Value]]: message, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.

    16. @@ -8588,6 +8608,16 @@ o.myself = o; OrdinaryDefineOwnProperty(value, "message", messageDesc).

      +
    17. Let errors be serialized.[[Errors]].

    18. + +
    19. Let errorsDesc be PropertyDescriptor{ [[Value]]: + errors, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true + }.

    20. + +
    21. If errors is not undefined, then perform ! + OrdinaryDefineOwnProperty(value, "errors", + errorsDesc).

    22. +
    23. Any interesting accompanying data attached to serialized should be deserialized and attached to value.