Skip to content

fix(ext/web): make DOMException properly serializable#31156

Closed
devsnek wants to merge 1 commit intomainfrom
serialize-domexception
Closed

fix(ext/web): make DOMException properly serializable#31156
devsnek wants to merge 1 commit intomainfrom
serialize-domexception

Conversation

@devsnek
Copy link
Copy Markdown
Member

@devsnek devsnek commented Nov 1, 2025

@devsnek devsnek force-pushed the serialize-domexception branch from d560b94 to 9b1f28f Compare November 1, 2025 09:35
bartlomieju added a commit to denoland/deno_core that referenced this pull request Nov 5, 2025
denoland/deno#31156

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Comment on lines +62 to +65
const de = structuredClone(new DOMException("message", "SomeError"));
assert(de instanceof DOMException);
assertEquals(de.message, "message");
assertEquals(de.name, "SomeError");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to copy the stack property as well

@bartlomieju
Copy link
Copy Markdown
Member

Closing in favor of #32675

bartlomieju added a commit that referenced this pull request Mar 13, 2026
## Summary
- Enables `structuredClone()` and `postMessage()` for `DOMException`
objects using the cloneable resource registry from #32672
- Serializes `message`, `name`, and `stack`; `code` is derived from
`name` on deserialization
- Supersedes #31156

Ref #31126 (comment)
Closes #31983

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants