-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: decorate undici classes as platform interfaces
Node recognizes platform/host objects by counting internal slots. Undici, as a downstream module, does not have access to internal slots, and hence its instances are recognized as plain objects. This caused issues on the `structureClone` algorithm, which has few restrictions on non-platform objects. This PR tries to fix it by decorating Undici classes with the internal slots so that underlying `Serialize()` can recognize its instances as host objects. On another note, this PR consolidates the lazy loading of Undici, so that the proxied Undici classes are referential equal.
- Loading branch information
Showing
4 changed files
with
58 additions
and
14 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
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
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
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