-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle AggregateError in structured data cloning #5716
Labels
Comments
annevk
added
integration
Better coordination across standards needed
topic: serialize and transfer
labels
Jul 9, 2020
@ricea or @yutakahirano, any interest in implementing this if I spec it? |
Has the new error already been implemented in V8? |
Yeah, it looks like it has. |
Then yes, I will implement the serialization part. |
I've posted a PR for this at #5749. It has some initial semantics, which maybe are good enough, or we could discuss refinements to them if people think that's worth the time. |
domenic
added a commit
that referenced
this issue
Jul 16, 2021
* Generalize the framework to work on any NativeError types introduced by the JS spec, instead of listing them explicitly in a way that could require future updates. * Also include WebAssembly Error classes. * Switch semantics for serializing/deserializing "message". Previously, we would check for the presence of the property, and if it was a data property, get its value, and then ToString() it. Now, we just Get() it and then structured-serialize the result. We also unconditionally install it on the other side, regardless of whether it was present on the original. This new property-cloning procedure is more general. * Use these new more general property cloning procedure on "cause" (for all errors) and "errors" (for objects that present as "AggregateError" objects). Closes #5716.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Ref tc39/ecma262#2040
AggregateError objects have an own property "errors". This property should probably be deeply cloned.
The text was updated successfully, but these errors were encountered: