GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [v20.x] module: bootstrap module loaders in shadow realm by legendecas · Pull Request #51239 · nodejs/node

Conversation

@legendecas

@legendecas legendecas commented Dec 20, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

/cc @UlisesGascon

Setting the PR target as v20.x-staging-backport because v20.x-staging has partial commits from #48655.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
legendecas and others added 6 commits December 20, 2023 22:27
@legendecas
src: make process binding data weak
dd5dd67
Avoid the realm being strongly referenced by the process binding data.

PR-URL: nodejs#48655
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@legendecas
src: create worker per isolate properties
f09515b
PR-URL: nodejs#48655
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@legendecas
src: create fs_dir per isolate properties
84af29b
PR-URL: nodejs#48655
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@legendecas
src: create per isolate proxy env template
afa56f1
PR-URL: nodejs#48655
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@legendecas
module: remove useCustomLoadersIfPresent flag
25d434c
The flag is always true and can be determined by isLoaderWorker solely.

PR-URL: nodejs#48655
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@legendecas
module: bootstrap module loaders in shadow realm
401dfc2
This bootstraps ESM loaders in the ShadowRealm with
`ShadowRealm.prototype.importValue` as its entry point and enables
loading ESM and CJS modules in the ShadowRealm. The module is imported
without a parent URL and resolved with the current process's working
directory.

PR-URL: nodejs#48655
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Dec 20, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/realm
  • @nodejs/startup
  • @nodejs/vm
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. v20.x labels Dec 20, 2023
@UlisesGascon
UlisesGascon changed the base branch from v20.x-staging-backport to v20.x-staging December 20, 2023 15:15
@UlisesGascon

UlisesGascon commented Dec 20, 2023

Copy link
Copy Markdown
Member

I updated the base to nodejs:v20.x-staging as I updated the brach matching nodejs:v20.x-staging-backport

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

UlisesGascon
UlisesGascon approved these changes Dec 20, 2023
View reviewed changes

@UlisesGascon UlisesGascon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @legendecas for the backport! LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 20, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 20, 2023
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@UlisesGascon UlisesGascon mentioned this pull request Dec 20, 2023
v20.11.0 proposal #51124
Merged
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

nodejs-github-bot commented Dec 20, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/56417/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UlisesGascon

UlisesGascon commented Dec 20, 2023

Copy link
Copy Markdown
Member

Not sure why the CI is hanging currently (maybe due osx resources) but between this and the previous executions the CI can be considered green, I was tracking the differences and the test errors. I will land this in the proposal, there I will run the CI again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

UlisesGascon pushed a commit that referenced this pull request Dec 20, 2023
@legendecas @UlisesGascon
src: make process binding data weak
444affd
Avoid the realm being strongly referenced by the process binding data.

PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Dec 20, 2023
@legendecas @UlisesGascon
src: create worker per isolate properties
eb7170c
PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Dec 20, 2023
@legendecas @UlisesGascon
src: create fs_dir per isolate properties
6b9892b
PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Dec 20, 2023
@legendecas @UlisesGascon
src: create per isolate proxy env template
23a86e5
PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Dec 20, 2023
@legendecas @UlisesGascon
module: remove useCustomLoadersIfPresent flag
ec63a13
The flag is always true and can be determined by isLoaderWorker solely.

PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Dec 20, 2023
@legendecas @UlisesGascon
module: bootstrap module loaders in shadow realm
b3041a0
This bootstraps ESM loaders in the ShadowRealm with
`ShadowRealm.prototype.importValue` as its entry point and enables
loading ESM and CJS modules in the ShadowRealm. The module is imported
without a parent URL and resolved with the current process's working
directory.

PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@UlisesGascon

UlisesGascon commented Dec 20, 2023

Copy link
Copy Markdown
Member

Landed in 7af8e20...b3041a0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UlisesGascon UlisesGascon closed this Dec 20, 2023
@legendecas
legendecas deleted the backport-48655-to-20 branch December 21, 2023 13:23
UlisesGascon pushed a commit that referenced this pull request Jan 9, 2024
@legendecas @UlisesGascon
src: make process binding data weak
621c4d6
Avoid the realm being strongly referenced by the process binding data.

PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Jan 9, 2024
@legendecas @UlisesGascon
src: create worker per isolate properties
14cc3b9
PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Jan 9, 2024
@legendecas @UlisesGascon
src: create fs_dir per isolate properties
d00412a
PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Jan 9, 2024
@legendecas @UlisesGascon
src: create per isolate proxy env template
11b3e47
PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Jan 9, 2024
@legendecas @UlisesGascon
module: remove useCustomLoadersIfPresent flag
8e886a2
The flag is always true and can be determined by isLoaderWorker solely.

PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Jan 9, 2024
@legendecas @UlisesGascon
module: bootstrap module loaders in shadow realm
21ab3c0
This bootstraps ESM loaders in the ShadowRealm with
`ShadowRealm.prototype.importValue` as its entry point and enables
loading ESM and CJS modules in the ShadowRealm. The module is imported
without a parent URL and resolved with the current process's working
directory.

PR-URL: #48655
Backport-PR-URL: #51239
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
codebytere added a commit to electron/electron that referenced this pull request Jan 16, 2024
@codebytere
fix: check for Buffer and global definition in shadow realm
4fe3dc1
nodejs/node#51239
codebytere added a commit to electron/electron that referenced this pull request Jan 16, 2024
@codebytere
fix: check for Buffer and global definition in shadow realm
9e690c2
nodejs/node#51239
codebytere added a commit to electron/electron that referenced this pull request Jan 18, 2024
@codebytere
fix: check for Buffer and global definition in shadow realm
6385b52
nodejs/node#51239
jkleinsc pushed a commit to electron/electron that referenced this pull request Jan 18, 2024
@codebytere @jkleinsc
fix: check for Buffer and global definition in shadow realm
529dbd5
nodejs/node#51239
codebytere added a commit to electron/electron that referenced this pull request Jan 18, 2024
@codebytere
fix: check for Buffer and global definition in shadow realm
6e6000c
nodejs/node#51239
jkleinsc pushed a commit to electron/electron that referenced this pull request Jan 18, 2024
@electron-roller @codebytere @zcbenz
chore: bump node to v20.11.0 (main) (#40941)
f4ee3c1
* chore: bump node in DEPS to v20.11.0

* module: bootstrap module loaders in shadow realm

nodejs/node#48655

* src: add commit hash shorthand in zlib version

nodejs/node#50158

* v8,tools: expose necessary V8 defines

nodejs/node#50820

* esm: do not call getSource when format is commonjs

nodejs/node#50465

* esm: fallback to readFileSync when source is nullish

nodejs/node#50825

* vm: allow dynamic import with a referrer realm

nodejs/node#50360

* test: skip test-diagnostics-channel-memory-leak.js

nodejs/node#50327

* esm: do not call getSource when format is commonjs

nodejs/node#50465

* lib: fix assert throwing different error messages in ESM and CJS

nodejs/node#50634

* src: fix compatility with upcoming V8 12.1 APIs

nodejs/node#50709

* deps: update base64 to 0.5.1

nodejs/node#50629

* src: avoid silent coercion to signed/unsigned int

nodejs/node#50663

* src: fix compatility with upcoming V8 12.1 APIs

nodejs/node#50709

* chore: fix patch indices

* chore: update patches

* test: disable TLS cipher test

This can't be enabled owing to BoringSSL incompatibilities.

nodejs/node#50186

* fix: check for Buffer and global definition in shadow realm

nodejs/node#51239

* test: disable parallel/test-shadow-realm-custom-loader

Incompatible with our asar logic, resulting in the following failure:

> Failed to CompileAndCall electron script: electron/js2c/asar_bundle

* chore: remove deleted parallel/test-crypto-modp1-error test

* test: make test-node-output-v8-warning generic

nodejs/node#50421

* chore: fixup ModuleWrap patch

* test: match wpt/streams/transferable/transform-stream-members.any.js to upstream

* fix: sandbox is not enabled on arm

* chore: disable v8 sandbox on ia32/arm

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: Cheng Zhao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@UlisesGascon UlisesGascon UlisesGascon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@legendecas @nodejs-github-bot @UlisesGascon @richardlau
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.