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: make sure globals can be loaded after globalThis is sealed #46831

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Feb 25, 2023

  1. lib: make sure globals can be loaded after globalThis is freezed

    Since we made some of the globals lazily loaded to reduce startup
    overhead, and tried to update then as data properties once loaded,
    the lazily-loaded globals can no longer be loaded once globalThis
    is freezed. Fix this by not attempting to overwrite the property
    on loading these globals (so the property descriptors won't be
    spec-compliant in this case, but at least it's a good compromise
    between breakages and startup overhead).
    
    Note that certain globals that come from undici are still broken
    because undici attempts to define a global dispatcher symbol
    on globalThis. This is reflected in the test.
    joyeecheung committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    7c6fc71 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2023

  1. Configuration menu
    Copy the full SHA
    8392842 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2023

  1. fixup! lib: make sure globals can be loaded after globalThis is sealed

    …nodejs#46831
    
    Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
    joyeecheung and aduh95 authored Feb 28, 2023
    Configuration menu
    Copy the full SHA
    fffbcbd View commit details
    Browse the repository at this point in the history