From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 22 Oct 2025 11:03:57 +0200
Subject: feat: disable js source phase imports by default.

Refs:
- https://chromium-review.googlesource.com/c/v8/v8/+/7003082
- https://chromium-review.googlesource.com/c/chromium/src/+/6336964
- https://github.com/nodejs/node/pull/56919

We need to disable source phase imports in renderer and worker processes - Chromium
disables them in content/renderer/render_process_impl.cc via and the process will
hard crash otherwise.

They shouldn't be enabled by default in Node.js either as they are still not yet
Stage 3.

Upstreamed in https://github.com/nodejs/node/pull/60364

diff --git a/src/node.cc b/src/node.cc
index b9d35e60f39d1edd910cd0fc1e57157458db93f5..4421ddd05f69e32f38d074a4cc04e4e7eac89e76 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -778,7 +778,7 @@ static ExitCode ProcessGlobalArgsInternal(std::vector<std::string>* args,
 
   if (std::ranges::find(v8_args, "--no-js-source-phase-imports") ==
       v8_args.end()) {
-    v8_args.emplace_back("--js-source-phase-imports");
+    // v8_args.emplace_back("--js-source-phase-imports");
   }
 
 #ifdef __POSIX__
