Skip to content

Commit

Permalink
bootstrap: make CJS loader snapshotable
Browse files Browse the repository at this point in the history
This patch makes the top-level access to runtime states in the
CJS loader lazy, and move the side-effects into a
initializeCJS() function that gets called during pre-execution.
As a result the CJS loader can be included into the built-in
snapshot.

PR-URL: nodejs/node#45849
Backport-PR-URL: nodejs/node#46425
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
sercher committed Apr 24, 2024
1 parent 5df6d42 commit db8ea44
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 124 deletions.

0 comments on commit db8ea44

Please sign in to comment.