Skip to content
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

lib: decorate undici classes as platform interfaces #55178

Closed
wants to merge 1 commit into from

Commits on Oct 1, 2024

  1. 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.
    jazelly committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    2fffbee View commit details
    Browse the repository at this point in the history