Skip to content

fix(web): support structuredClone for DOMException#32675

Merged
bartlomieju merged 3 commits intodenoland:mainfrom
bartlomieju:fix/domexception-structured-clone
Mar 13, 2026
Merged

fix(web): support structuredClone for DOMException#32675
bartlomieju merged 3 commits intodenoland:mainfrom
bartlomieju:fix/domexception-structured-clone

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

@bartlomieju bartlomieju commented Mar 12, 2026

Summary

Ref #31126 (comment)
Closes #31983

Uses the cloneable resource registry to enable structured cloning of
DOMException objects. Serializes message, name, and stack; code is
derived from name on deserialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bartlomieju and others added 2 commits March 13, 2026 08:52
Mark newly passing tests: DOMException cloning, stream error
propagation with DOMException, and unclonable object errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same fix as CryptoKey — prevents deepStrictEqual from comparing
the closure instances.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 5b7680f into denoland:main Mar 13, 2026
113 checks passed
@bartlomieju bartlomieju deleted the fix/domexception-structured-clone branch March 13, 2026 10:23
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.

DOMException loses properties (e.g. code, name) when transferred to a Worker

2 participants