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
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
").
Let errors be undefined.
If name is "AggregateError", then:
+ +Let errorsDesc be ? value.[[GetOwnProperty]]("errors
").
If IsDataDescriptor(errorsDesc) is true, then set + errors to ? + StructuredSerializeInternal(errorsDesc.[[Value]], + forStorage, memory).
Set serialized to { [[Type]]: "Error", [[Name]]: name, - [[Message]]: message }.
User agents should attach a serialized representation of any interesting accompanying @@ -8557,6 +8574,9 @@ o.myself = o;
Let prototype be %Error.prototype%.
If serialized.[[Name]] is "AggregateError", then set prototype to + %AggregateError.prototype%.
If serialized.[[Name]] is "EvalError", then set prototype to %EvalError.prototype%.
If serialized.[[Name]] is "URIError", then set prototype to %URIError.prototype%.
Let message be serialized.[[Message]].
Set value to ! ObjectCreate(prototype, « [[ErrorData]] »).
Let message be serialized.[[Message]].
Let messageDesc be PropertyDescriptor{ [[Value]]: message, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.
message
",
messageDesc).Let errors be serialized.[[Errors]].
Let errorsDesc be PropertyDescriptor{ [[Value]]: + errors, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true + }.
If errors is not undefined, then perform !
+ OrdinaryDefineOwnProperty(value, "errors
",
+ errorsDesc).
Any interesting accompanying data attached to serialized should be deserialized and attached to value.