-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make StructuredClone throw if an object is not explicitly cloneable
StructuredClone used to throw for “host objects” (now objects with a [[Clone]] internal method) and objects whose [[Class]] was not “Object” (now objects which have an internal slot other than [[Prototype]] or [[Extensible]]). This commit restores that behavior. This also fixes the invocation of [[Clone]] by passing memory too. This regressed in bfb960c. This fixes #766. This affects Chrome. Edge and Firefox already do the right thing.
- Loading branch information
Showing
1 changed file
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters