Compare commits

...

13 Commits

Author SHA1 Message Date
Shelley Vohr
7fbadd9fe7 build: remove AdaptCallbackForRepeating patch 2025-05-06 14:34:03 +02:00
Shelley Vohr
a5ec3f7476 fix: allowed dialog file types with one filter (#46900) 2025-05-06 10:31:00 +02:00
Erick Zhao
be399f2fee docs: use correct heading level for API function (#46892) 2025-05-05 16:10:37 -05:00
electron-roller[bot]
b90de7d07e chore: bump chromium to 138.0.7160.0 (main) (#46915)
* chore: bump chromium in DEPS to 138.0.7158.0

* chore: bump chromium in DEPS to 138.0.7160.0

* 6509206: Move Keychain UI suppression code into apple_keychain.cc

https://chromium-review.googlesource.com/c/chromium/src/+/6509206

* 6489036: Fix DesktopDataControlsDialog for Glic

https://chromium-review.googlesource.com/c/chromium/src/+/6489036

* chore: fixup patch indices

* 6506662: Reland "NavigationThrottleRunner2: content::NavigationThrottleRegistry"

https://chromium-review.googlesource.com/c/chromium/src/+/6506662

* 6499811: [video pip] Add live caption dialog

https://chromium-review.googlesource.com/c/chromium/src/+/6499811

* 6487926: Add GetMaxImageDimension function to ScreenAI service API for OCR.

https://chromium-review.googlesource.com/c/chromium/src/+/6487926

* 6494942: [json] Activate stringify fast-path by default

https://chromium-review.googlesource.com/c/v8/v8/+/6494942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-05 13:58:40 -04:00
Charles Kerr
9460300506 refactor: devirtualize NativeWindow methods (#46904)
* refactor: devirtualize NativeWindow::SetSize()

refactor: devirtualize NativeWindow::GetSize()

refactor: devirtualize NativeWindow::SetPosition()

refactor: devirtualize NativeWindow::GetPosition()

* refactor: devirtualize NativeWinodw::SetMinimumSize()

refactor: devirtualize NativeWinodw::GetMinimumSize()

refactor: devirtualize NativeWinodw::SetMaximumSize()

refactor: devirtualize NativeWinodw::GetMaximumSize()

* refactor: devirtualize NativeWindow::SetSheetOffset()

refactor: devirtualize NativeWindow::GetSheetOffsetX()

refactor: devirtualize NativeWindow::GetSheetOffsetY()

* refactor: devirtualize NativeWindow::GetContentMinimumSize()

refactor: devirtualize NativeWindow::GetContentMaximumSize()
2025-05-05 09:29:05 -05:00
Charles Kerr
3362db0655 refactor: remove some NativeWindow public API (#46919)
* refactor: make NativeWindow::titlebar_overlay_height_ private

* refactor: make NativeWindow::set_has_frame() protected

* refactor: remove NativeWindow::background_material()

It's only used once, in NativeWindow, so use |background_material_| directly.

* refactor: remove NativeWindow::vibrancy()

It's only used once, in a NativeWindow method, so use |vibrancy_| directly.

* refactor: unfriend api::BrowserView

It was added in Oct 2022 by 23d4a25 for access to protected NativeWindow
methods add_inspectable_view() and remove_inspectable_view().

That dependency was removed in Nov 2022 by 184ac2b, so BrowserView
doesn't need access to NativeWindow's private fields & methods anymore.

* refactor: make NativeWindow::ContentBoundsToWindowBounds() protected

refactor: make NativeWindow::WindowBoundsToContentBounds() protected
2025-05-05 09:28:49 -05:00
Charles Kerr
2e2776611f refactor: simplify NativeWindow::FullScreenTransitionState (#46918)
* refactor: make NativeWindow::fullscreen_transition_state_ private

* refactor: add NativeWindow::is_transitioning_fullscreen() helper

* refactor: remove unused NativeWindow::fullscreen_transition_state()

* refactor: replace NativeWindow::set_fullscreen_transition_state() with NativeWindow::set_is_transitioning_fullscreen()

refactor: remove unused NativeWindow::FullScreenTransitionState
2025-05-05 09:28:29 -05:00
Charles Kerr
1f4f1b4afc refactor: add NativeWindow::FromWidget() helper (#46917)
refactor: add NativeWindow::FromWidet() helper

refactor: make kElectronNativeWindowKey a protected field
2025-05-05 09:27:41 -05:00
electron-roller[bot]
cb445b3bbd chore: bump node to v22.15.0 (main) (#46742)
* chore: bump node in DEPS to v22.15.0

* inspector: fix GN build

https://github.com/nodejs/node/pull/56798

* test: search cctest files

https://github.com/nodejs/node/pull/56791

* crypto: fix missing OPENSSL_NO_ENGINE guard

https://github.com/nodejs/node/pull/57012

* test,crypto: make tests work for BoringSSL

https://github.com/nodejs/node/pull/57021

* module: use synchronous hooks for preparsing in import(cjs)

https://github.com/nodejs/node/pull/55698

* deps: update simdjson to 3.12.0

https://github.com/nodejs/node/pull/56874

* build: remove explicit linker call to libm on macOS

https://github.com/nodejs/node/pull/56901

* test: make eval snapshot comparison more flexible

https://github.com/nodejs/node/pull/57020

* src: allow embedder customization of OOMErrorHandler

https://github.com/nodejs/node/pull/57325

* src: do not pass nullptr to std::string ctor

https://github.com/nodejs/node/pull/57354

* src: lock the isolate properly in IsolateData destructor

https://github.com/nodejs/node/pull/57031

* chore: shrink --trace-atomics-wait patch

* chore: fixup patch indices

* build: fix GN build failure

https://github.com/nodejs/node/pull/57013

* crypto: expose security levels

https://github.com/nodejs/node/pull/56601

* zlib: add zstd support

https://github.com/nodejs/node/pull/52100

* test: move crypto related common utilities in common/crypto

https://github.com/nodejs/node/pull/56714

* cli: move --trace-atomics-wait to eol

https://github.com/nodejs/node/pull/52747

* test: disable test-https-client-renegotiation-limit

BoringSSL doesn't support caller-initiated renegotiation - see
https://source.chromium.org/chromium/chromium/src/+/main:third_party/boringssl/src/ssl/ssl_lib.cc;l=1627-1631

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-05 10:23:17 +02:00
Robo
91626a8eac fix: xdg portal version detection for file dialogs on linux (#46905)
* chore: use dbus thread for portal version detection

* Update shell/browser/ui/file_dialog_linux_portal.cc

Co-authored-by: Robo <hop2deep@gmail.com>

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-05 16:57:20 +09:00
electron-roller[bot]
5390728cb7 chore: bump chromium to 138.0.7156.0 (main) (#46902)
* chore: bump chromium in DEPS to 138.0.7156.0

* chore: update patches

* chore: ICWYU

* Allow SecKeychain and SecItem implementations of AppleKeychain to coexist

https://chromium-review.googlesource.com/c/chromium/src/+/6444777

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-02 21:06:50 -04:00
Derek Cicerone
074b9344b5 fix: prevent log files being written to current directory on Windows (#44413)
* fix: prevent log files being written to current directory on Windows

* Update shell/common/logging.cc

Co-authored-by: Robo <hop2deep@gmail.com>

* chore: add test

* chore: update includes

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6418805

* chore: address review feedback

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2025-05-02 16:27:29 -05:00
Charles Kerr
3faddd5ae2 refactor: move IsClosed() and IsClosable() tests into NativeWindow::Close() (#46888)
refactor: devirtualize NativeWindow::IsClosed()
2025-05-02 13:21:29 -05:00
116 changed files with 930 additions and 1692 deletions

4
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'138.0.7154.0',
'138.0.7160.0',
'node_version':
'v22.14.0',
'v22.15.0',
'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213',
'squirrel.mac_version':

View File

@@ -1490,7 +1490,7 @@ and internal requests made by the runtime (ex: geolocation queries).
This method can only be called after app is ready.
#### `app.resolveProxy(url)`
### `app.resolveProxy(url)`
* `url` URL

View File

@@ -35,6 +35,7 @@ filenames = {
"shell/browser/relauncher_linux.cc",
"shell/browser/ui/electron_desktop_window_tree_host_linux.cc",
"shell/browser/ui/file_dialog_linux.cc",
"shell/browser/ui/file_dialog_linux_portal.cc",
"shell/browser/ui/gtk/menu_gtk.cc",
"shell/browser/ui/gtk/menu_gtk.h",
"shell/browser/ui/gtk/menu_util.cc",

View File

@@ -62,7 +62,6 @@ disable_unload_metrics.patch
extend_apply_webpreferences.patch
build_libc_as_static_library.patch
build_do_not_depend_on_packed_resource_integrity.patch
refactor_restore_base_adaptcallbackforrepeating.patch
hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
logging_win32_only_create_a_console_if_logging_to_stderr.patch
fix_media_key_usage_with_globalshortcuts.patch

View File

@@ -9,7 +9,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
2. Ctrl-Shift-= and Ctrl-Plus show up as such
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f1d1c8d61 100644
index 5ad9332dd27ceda7d67cd3f571b12218a4415a40..ffe083836c39fb60b4bff1f9fbdd6cebb7fa9d1d 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -12,6 +12,7 @@
@@ -20,7 +20,7 @@ index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f
#include "base/strings/utf_string_conversions.h"
#include "base/types/cxx23_to_underlying.h"
#include "build/build_config.h"
@@ -160,6 +161,11 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
@@ -164,6 +165,11 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
#endif
if (key_string.empty()) {
@@ -32,7 +32,7 @@ index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f
#if BUILDFLAG(IS_WIN)
// Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
@@ -186,6 +192,10 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
@@ -190,6 +196,10 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
}
#endif
@@ -43,7 +43,7 @@ index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f
}
return key_string;
@@ -346,7 +356,7 @@ std::vector<std::u16string> Accelerator::GetLongFormModifiers() const {
@@ -350,7 +360,7 @@ std::vector<std::u16string> Accelerator::GetLongFormModifiers() const {
modifiers.push_back(l10n_util::GetStringUTF16(IDS_APP_CTRL_KEY));
}

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb354ea028 100644
index db655a7b52eacb74f2a8637db36abd87f6b86792..8014cb08e2090a12ea8b9e92cb8f93c96921d400 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -149,6 +149,8 @@ class CONTENT_EXPORT RenderFrameObserver
@@ -23,10 +23,10 @@ index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index c0ee479cea4f34fcfac502a20130fbb4c8becc15..3be4b5225fe791901ba27b9fbb7a21ea1ae5d4ff 100644
index b0aa018f2f4e6865915516ab6b65fac20d9e6f20..c04a544eb8991bfa718322e6e3a090ef4733a50b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4811,6 +4811,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4807,6 +4807,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}

View File

@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
WindowList.
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df13aa0649 100644
index ce3840087d3becac116e57ed8c690b73e360f95f..a929b2d4f6c4b34f9e278aada9f8f793477c6d19 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
@@ -48,6 +48,7 @@
@@ -21,7 +21,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/accessibility/platform/ax_platform_node.h"
@@ -168,7 +169,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
@@ -169,7 +170,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
rvh->GetRoutingID(), accessibility_mode);
}
@@ -30,7 +30,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
base::Value::Dict target_data;
target_data.Set(kSessionIdField, browser->session_id().id());
@@ -192,7 +193,7 @@ void HandleAccessibilityRequestCallback(
@@ -193,7 +194,7 @@ void HandleAccessibilityRequestCallback(
auto& browser_accessibility_state =
*content::BrowserAccessibilityState::GetInstance();
base::Value::Dict data;
@@ -39,7 +39,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
bool web = mode.has_mode(ui::AXMode::kWebContents);
@@ -240,7 +241,7 @@ void HandleAccessibilityRequestCallback(
@@ -246,7 +247,7 @@ void HandleAccessibilityRequestCallback(
initial_process_mode.has_mode(ui::AXMode::kHTML)));
std::string pref_api_type =
@@ -48,7 +48,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
bool pref_api_type_supported = false;
std::vector<ui::AXApiType::Type> supported_api_types =
@@ -307,11 +308,11 @@ void HandleAccessibilityRequestCallback(
@@ -314,11 +315,11 @@ void HandleAccessibilityRequestCallback(
data.Set(kPagesField, std::move(page_list));
base::Value::List browser_list;
@@ -62,7 +62,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
data.Set(kBrowsersField, std::move(browser_list));
std::string json_string;
@@ -783,7 +784,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
@@ -792,7 +793,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
const std::string value = CheckJSValue(data.FindString(kValueField));
if (string_name == kApiTypeField) {
@@ -72,7 +72,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
pref->SetString(prefs::kShownAccessibilityApiType, value);
}
}
@@ -837,7 +839,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -846,7 +848,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -82,7 +82,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
ui::AXApiType::Type api_type =
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
std::string accessibility_contents =
@@ -864,6 +867,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -873,6 +876,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -90,7 +90,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->session_id().id() == session_id) {
base::Value::Dict result = BuildTargetDescriptor(browser);
@@ -876,6 +880,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -885,6 +889,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
@@ -98,7 +98,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
#endif // !BUILDFLAG(IS_ANDROID)
// No browser with the specified |session_id| was found.
base::Value::Dict result;
@@ -919,11 +924,13 @@ void AccessibilityUIMessageHandler::StopRecording(
@@ -928,11 +933,13 @@ void AccessibilityUIMessageHandler::StopRecording(
}
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@@ -115,7 +115,7 @@ index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df
// Check to see if it is in the supported types list.
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
supported_types.end()) {
@@ -993,8 +1000,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
@@ -1002,8 +1009,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {

View File

@@ -23,10 +23,10 @@ index f9b27264f7e3e1f8de6f088ccb78e4a4693c5e93..85aebec5028fd6b324a1f1d9416fbf99
return receiver_.BindNewEndpointAndPassDedicatedRemote();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 00b1dc2ab7661d9ab76d0c6787bfe406327039ad..22c2a68428ed881b63e4458d17d5ff542cefe559 100644
index 9d430ebff1067323f229c3b81b18300e8cb7e8a9..090125bc5a4c485c83d9eaa6b82ed5cf3402cbbd 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -763,6 +763,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -768,6 +768,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}

View File

@@ -49,7 +49,7 @@ index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d048
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index ecaae5e1a2911b122678b2f4f77b5796323ad0bf..fbfd4d96e8082df8c5db5d354ac7c39bc329d4ee 100644
index a309befcbcb1e7fe667bc1d794141fb90fea1035..dd148eb3cce762d20e9117b4f8030c881057b8bb 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -753,10 +753,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {

View File

@@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 5e0f05804e8142c735fa2f5afb27485caae895f9..48ac9a600b6a007e2e974b657c3d8048be97b3ce 100644
index e9f891a025771899ffc888ea0095200342e48558..39d6f580c0cb5a0de41f32e9d7e103e05cefd0f0 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
@@ -102,6 +102,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
perfetto::Category("drm"),
perfetto::Category("drmcursor"),
perfetto::Category("dwrite"),

View File

@@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
This is similar to the //build usecase so we're OK adding ourselves here
diff --git a/.gn b/.gn
index ae58a0b0a64ae1fdb3f9cd8587041d71a121c6b9..7a1373c1cb78133375071cf5479561b64376b4dc 100644
index ae58a0b0a64ae1fdb3f9cd8587041d71a121c6b9..0ed56526002b12deb6d29f3dd23a0d74d8e7473c 100644
--- a/.gn
+++ b/.gn
@@ -167,4 +167,26 @@ exec_script_allowlist =
@@ -167,4 +167,27 @@ exec_script_allowlist =
"//tools/grit/grit_rule.gni",
"//tools/gritsettings/BUILD.gn",
@@ -34,5 +34,6 @@ index ae58a0b0a64ae1fdb3f9cd8587041d71a121c6b9..7a1373c1cb78133375071cf5479561b6
+ "//third_party/electron_node/deps/sqlite/unofficial.gni",
+ "//third_party/electron_node/deps/uv/unofficial.gni",
+ "//third_party/electron_node/deps/uvwasi/unofficial.gni",
+ "//third_party/electron_node/deps/zstd/unofficial.gni",
+ "//third_party/electron_node/src/inspector/unofficial.gni",
]

View File

@@ -33,10 +33,10 @@ index 4b3f01018a9dea91b46b5917e099f272582991b2..8250f2e447ff19829cfae3f00b3df70b
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 4e84a91033465438d8510ba532ba795a2eb6bcf6..b9f60071a41de560a36214a6490d206382d9d6cb 100644
index ae32014a8a25f3b1de7f6087551a87400e1463b5..be77c4e02cc495194ed6b248e56bcb75abe4efce 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4631,7 +4631,7 @@ static_library("browser") {
@@ -4627,7 +4627,7 @@ static_library("browser") {
[ "//chrome/browser/ui/webui/signin:profile_impl" ]
}
@@ -46,10 +46,10 @@ index 4e84a91033465438d8510ba532ba795a2eb6bcf6..b9f60071a41de560a36214a6490d2063
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 05073b10cb0c86b63f50071ef7e04225ef0627ec..de6c65e2ada9696c9a6c183f02493ea446e8bd3d 100644
index e08035df314884fab39562cd9ee4960ec5af3cb5..28f0f4d671e16ffff770b43fa5a2e366491d4b30 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7184,9 +7184,12 @@ test("unit_tests") {
@@ -7185,9 +7185,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index ad821a07ad808b392633f0e8e774b6082cc3b184..df50b84cca214a9b6a85afe2fd677a45e2529cdc 100644
index 9d5452597f64906ac1d3223ca5290776df8809c5..46ddad111b2feb5cc1064a1eeb424800d2cba6c1 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9775,6 +9775,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9777,6 +9777,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index ad821a07ad808b392633f0e8e774b6082cc3b184..df50b84cca214a9b6a85afe2fd677a45
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2039ac799297183b16fb4795b63c6c5b76dac478..fec569763d3ba8b171ca65a9ea523ada5f729f41 100644
index 77954ceccdfb1e94598d5d7ad747721ab84aa1d7..aec96f969800e2a4d09e644df770d367e48b1b63 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5131,6 +5131,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5132,6 +5132,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
opener);
@@ -37,7 +37,7 @@ index 2039ac799297183b16fb4795b63c6c5b76dac478..fec569763d3ba8b171ca65a9ea523ada
// If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -5172,12 +5178,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5173,12 +5179,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -66,7 +66,7 @@ index 55bb4ae3bab4cdf20b3e1dde9450a5c0e4e62b37..fe444c7fa140166a1b65c7a8a2676e2d
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index b3975f65bfbcff7bc9eb0815a0ac5e97d1ff3548..2b219ccfdbef82f9e4075243da48c4b1e53158c2 100644
index 210e5ffc0da31cc0d214e8a3e65f7d8b045fd33e..237b279eeefe5b18402a7dea8d1c00072655ed22 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -823,6 +823,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -79,7 +79,7 @@ index b3975f65bfbcff7bc9eb0815a0ac5e97d1ff3548..2b219ccfdbef82f9e4075243da48c4b1
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 77b3e5c0fe47e5ed0139d3e54394f7d96fc69d21..cabdb73fa092683cdd2dad38f7b62b6bac974d0d 100644
index be551d7a09330edf4a204b181acb382c2c3d13f4..5ed4df05dd22cbf901ecbbcc9d892de806c93890 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -199,6 +199,7 @@ class NetworkService;
@@ -90,7 +90,7 @@ index 77b3e5c0fe47e5ed0139d3e54394f7d96fc69d21..cabdb73fa092683cdd2dad38f7b62b6b
} // namespace network
namespace sandbox {
@@ -1378,6 +1379,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1379,6 +1380,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -148,10 +148,10 @@ index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f772
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 6dd63dbd96ce5c941790f97929b2826a03cabbcc..c0ee479cea4f34fcfac502a20130fbb4c8becc15 100644
index 7f33a5452de32f5f4f8a43d0314917f24308d77c..b0aa018f2f4e6865915516ab6b65fac20d9e6f20 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6942,6 +6942,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6938,6 +6938,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -163,10 +163,10 @@ index 6dd63dbd96ce5c941790f97929b2826a03cabbcc..c0ee479cea4f34fcfac502a20130fbb4
// moved on send.
bool is_background_tab =
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
index 75bd6c082dbda49bd5ee177105d78b670d147034..bceb8a8acf9a23d0d1df2d6749b94f4c98ee72ec 100644
index e5f7596c1b3e525e1d64efbd6b7e0703b980dac9..0b4523200651c1edfd7678b177a24b7e64de6ddf 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -535,6 +535,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -538,6 +538,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -176,10 +176,10 @@ index 75bd6c082dbda49bd5ee177105d78b670d147034..bceb8a8acf9a23d0d1df2d6749b94f4c
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
index 78eafab336717b7ec8adab23b3bd8baace7b3e09..16cfe915177d812bce5738acf2b1991b7eb1aeb1 100644
index e4eaba65b25262ce5ed27d78da13a260ec57f6db..ddd3be9aa7aac43140a1e664eefce7ac195ba119 100644
--- a/content/web_test/browser/web_test_content_browser_client.h
+++ b/content/web_test/browser/web_test_content_browser_client.h
@@ -94,6 +94,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -95,6 +95,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,

View File

@@ -49,11 +49,11 @@ index ae7eab37f12ba80ec423d229cf048021e9ba6765..507a75dc7947295db221b01356fa57ba
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop class.
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..e79beefddbd815e1ba7d9be86256e49d3ee7c619 100644
index 89de188e6a0139a236a824b189f1048613d6f457..c438376c34cac4ec7ac7a03d852685c18b10068e 100644
--- a/ui/views/widget/widget_delegate.h
+++ b/ui/views/widget/widget_delegate.h
@@ -169,6 +169,12 @@ namespace data_controls {
class DesktopDataControlsDialog;
@@ -165,6 +165,12 @@ namespace crostini {
class AppRestartDialog;
}
+namespace electron {
@@ -65,7 +65,7 @@ index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..e79beefddbd815e1ba7d9be86256e49d
namespace enterprise_connectors {
class ContentAnalysisDialog;
class ContentAnalysisDialogBehaviorBrowserTest;
@@ -371,6 +377,7 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -367,6 +373,7 @@ class VIEWS_EXPORT WidgetDelegate {
class OwnedByWidgetPassKey {
private:
@@ -73,7 +73,7 @@ index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..e79beefddbd815e1ba7d9be86256e49d
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `SetOwnedByWidget()`.
@@ -468,6 +475,7 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -463,6 +470,7 @@ class VIEWS_EXPORT WidgetDelegate {
};
class RegisterDeleteCallbackPassKey {
private:
@@ -81,7 +81,7 @@ index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..e79beefddbd815e1ba7d9be86256e49d
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `RegisterDeleteDelegateCallback()`.
@@ -918,6 +926,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
@@ -913,6 +921,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
View* GetContentsView() override;
private:

View File

@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 05859e343a6c1fa58f3fb847ad6e97982804f910..5fef3e077072ee9dc3ff22110b7818503c8b4e4b 100644
index 459fc0eff0bfe2ec005d6f34cf7e91c2d601fd06..35de681eac3f65ce3e0435bd984159154ece2b7f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5050,7 +5050,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5051,7 +5051,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
: IsGuest();
// While some guest types do not have a guest SiteInstance, the ones that
// don't all override WebContents creation above.

View File

@@ -14,10 +14,10 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index adaa1cd426c138972b088d0d0093b0e1653af231..be4684c94ba2214255c5dbe9cdcf1ea316c60c06 100644
index 4007e92316a6ac59145fa9bc021904fd1b3b0136..afedeaea7fd419f3374ffeebb7ee931219a90f93 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -229,7 +229,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
@@ -226,7 +226,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
BrowserContext* browser_context,
const StoragePartitionConfig& partition_config) {
DCHECK(browser_context);

View File

@@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
content::WebContents* AddNewContents(
content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e236eb74db68a6c11892e1ea16cab05b8c47afbf..b2d5733ff8c47f497af03171d9dfac68b2013e4d 100644
index c1c3db2992038cad0c01ce65c57676f8fe281830..2ad1479de622d956c701d8dc4adb75d0114f65b1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5013,8 +5013,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5014,8 +5014,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@@ -352,7 +352,7 @@ index 2dcf51f335f5dac39f431c3e0f56f8789f33d40b..2b433624d0604e0b9da5117b9e83cc15
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
index 45c7aa83272dfa0d55ac3582a109b376184b389b..2841f550ac1724de4631aae0dd614e2ce3f522f5 100644
index c10903a8e7e5fb66a1b038eab9015658a93672df..5a3afdb8ababf6e465c6166ca6229af7b4d6941d 100644
--- a/fuchsia_web/webengine/browser/frame_impl.cc
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
@@ -576,8 +576,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(

View File

@@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b
NOTREACHED();
}
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f759359066f 100644
index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0326bb438 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
@@ -111,7 +111,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
@@ -147,7 +147,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
const bool registered =
platform_global_shortcut_listener_->RegisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(),
@@ -52,7 +52,7 @@ index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f75
if (registered) {
registered_hot_keys_.insert(accelerator);
}
@@ -126,14 +127,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
@@ -162,14 +163,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
platform_global_shortcut_listener_->UnregisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
@@ -70,7 +70,7 @@ index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f75
int modifiers = 0;
if (is_alt_down) {
modifiers |= ui::EF_ALT_DOWN;
@@ -144,6 +146,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
@@ -180,6 +182,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
if (is_shift_down) {
modifiers |= ui::EF_SHIFT_DOWN;
}

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index aa342545b9e629c4194b8da90380e612ede423d6..3ef48ead14bde84dac0207c1b9ceaf3abf1e637e 100644
index b4c984e0dd22f148a426ce0ea04988798ed95aaa..5fd099b6396fc51d29fce2843531d5fc89642d35 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1971,6 +1971,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1961,6 +1961,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index aa342545b9e629c4194b8da90380e612ede423d6..3ef48ead14bde84dac0207c1b9ceaf3a
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1990,9 +2010,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1980,9 +2000,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme_piece() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index aa342545b9e629c4194b8da90380e612ede423d6..3ef48ead14bde84dac0207c1b9ceaf3a
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -2000,9 +2018,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1990,9 +2008,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme_piece() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 7b11077760d2a79312bd1871582733a7b0af71a0..8637d83c1d3a912bbc48effcc095b426640351ad 100644
index b722e19e8c660d13750ea7bf505e28a9c1d9d59f..bac913e30ce140d9b370186781cccf5817885076 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -830,6 +830,10 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -831,6 +831,10 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}

View File

@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index 9cc3ae76503699417e8b7a2bd18d0b899e20d790..cba63c2eacdb1c02391941854f94dd5e2ddc2776 100644
index 54ce1ea5ac11c9831a9553fbb5c5584c05440071..be95785fa144a4f11a3c97fea562dd4635ffe7b0 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1470,6 +1470,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1476,6 +1476,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@@ -35,7 +35,7 @@ index 9cc3ae76503699417e8b7a2bd18d0b899e20d790..cba63c2eacdb1c02391941854f94dd5e
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1519,6 +1520,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1525,6 +1526,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

View File

@@ -149,7 +149,7 @@ index 402355cb836cea14e9ee725a142a4bad44fd5bed..7e7f028dcfb87c7b80adebabac19ced8
void* FromV8Impl(v8::Isolate* isolate, v8::Local<v8::Value> val,
diff --git a/gin/wrappable.h b/gin/wrappable.h
index 4e7115685a5bf6997e78edcc1851e28bd00b1aa2..ca51fe33605e855438e88969e3d3cc734ef4523e 100644
index 2ae2cf67157ce8b161ae917291a913d237b7d535..c8c8cbe84e946cebde97a71b42815c62ccaf7b96 100644
--- a/gin/wrappable.h
+++ b/gin/wrappable.h
@@ -80,6 +80,13 @@ class GIN_EXPORT WrappableBase {

View File

@@ -10,6 +10,8 @@ This CL adds support for the following features to //shell_dialogs:
It also:
* Changes XDG Portal implementation behavior to set default path regardless of dialog type.
* XDG Portal implementation calls into //electron to perform version checks on the dbus thread
Refs https://github.com/electron/electron/issues/46652.
This may be partially upstreamed to Chromium in the future.
@@ -345,83 +347,52 @@ index 9d45ec49a4fb5e12407b65b83c1ba0c13cd0dfd8..400cce91b020ecd5e48566f125515d2c
+
} // namespace ui
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..d29de35ac813cc68b1faa11e803ace9a78df74ba 100644
index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db84e8dff6 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
@@ -12,6 +12,7 @@
#include <string_view>
#include "base/check.h"
+#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/logging.h"
@@ -45,6 +46,8 @@ namespace {
constexpr char kXdgPortalService[] = "org.freedesktop.portal.Desktop";
constexpr char kXdgPortalObject[] = "/org/freedesktop/portal/desktop";
+// Version 4 includes support for current_folder option to the OpenFile method via
+// https://github.com/flatpak/xdg-desktop-portal/commit/71165a5.
constexpr int kXdgPortalRequiredVersion = 3;
constexpr char kFileChooserInterfaceName[] =
@@ -66,6 +69,8 @@ constexpr uint32_t kFileChooserFilterKindGlob = 0;
constexpr char kFileUriPrefix[] = "file://";
+const char kXdgPortalRequiredVersionFlag[] = "xdg-portal-required-version";
+
enum class ServiceAvailability {
kNotStarted,
kInProgress,
@@ -75,6 +80,9 @@ enum class ServiceAvailability {
ServiceAvailability g_service_availability = ServiceAvailability::kNotStarted;
+uint32_t g_available_portal_version = 0;
+uint32_t g_required_portal_version = kXdgPortalRequiredVersion;
+
scoped_refptr<base::SequencedTaskRunner>& GetMainTaskRunner() {
static base::NoDestructor<scoped_refptr<base::SequencedTaskRunner>>
main_task_runner;
@@ -94,9 +102,10 @@ void OnGetPropertyReply(dbus::Response* response) {
return;
}
- g_service_availability = version >= kXdgPortalRequiredVersion
+ g_service_availability = version >= g_required_portal_version
? ServiceAvailability::kAvailable
@@ -28,6 +28,7 @@
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
+#include "electron/shell/browser/ui/file_dialog.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/native_widget_types.h"
@@ -99,7 +100,7 @@ void OnGetPropertyReply(dbus::Response* response) {
: ServiceAvailability::kNotAvailable;
+ g_available_portal_version = version;
}
void OnServiceStarted(std::optional<bool> service_started) {
@@ -164,6 +173,12 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
}
g_service_availability = ServiceAvailability::kInProgress;
-void OnServiceStarted(std::optional<bool> service_started) {
+[[maybe_unused]] void OnServiceStarted(std::optional<bool> service_started) {
if (!service_started.value_or(false)) {
g_service_availability = ServiceAvailability::kNotAvailable;
return;
@@ -166,18 +167,24 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
+ auto* cmd = base::CommandLine::ForCurrentProcess();
+ if (!base::StringToUint(cmd->GetSwitchValueASCII(kXdgPortalRequiredVersionFlag),
+ &g_required_portal_version)) {
+ g_required_portal_version = kXdgPortalRequiredVersion;
+ }
+
GetMainTaskRunner() = base::SequencedTaskRunner::GetCurrentDefault();
+#if 0
dbus_utils::CheckForServiceAndStart(dbus_thread_linux::GetSharedSessionBus(),
@@ -180,6 +195,11 @@ bool SelectFileDialogLinuxPortal::IsPortalAvailable() {
return g_service_availability == ServiceAvailability::kAvailable;
kXdgPortalService,
base::BindOnce(&OnServiceStarted));
+#endif
+ file_dialog::StartPortalAvailabilityTestInBackground();
}
// static
bool SelectFileDialogLinuxPortal::IsPortalAvailable() {
+#if 0
if (g_service_availability == ServiceAvailability::kInProgress) {
LOG(WARNING) << "Portal availability checked before test was complete";
}
return g_service_availability == ServiceAvailability::kAvailable;
+#endif
+ return file_dialog::IsPortalAvailable();
}
+// static
+uint32_t SelectFileDialogLinuxPortal::GetPortalVersion() {
+ return g_available_portal_version;
+}
+
bool SelectFileDialogLinuxPortal::IsRunning(
gfx::NativeWindow parent_window) const {
return parent_window && host_ && host_.get() == parent_window->GetHost();
@@ -382,11 +402,14 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -382,11 +389,14 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
const PortalFilterSet& filter_set) {
DbusDictionary dict;
@@ -439,7 +410,7 @@ index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..d29de35ac813cc68b1faa11e803ace9a
[[fallthrough]];
case SelectFileDialog::SELECT_FOLDER:
case SelectFileDialog::Type::SELECT_EXISTING_FOLDER:
@@ -399,6 +422,10 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -399,6 +409,10 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
break;
}
@@ -450,17 +421,3 @@ index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..d29de35ac813cc68b1faa11e803ace9a
if (!default_path.empty()) {
if (default_path_exists) {
// If this is an existing directory, navigate to that directory, with no
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.h b/ui/shell_dialogs/select_file_dialog_linux_portal.h
index 651684b1840eaff664f3d73d99bbea40e097c866..9a9d541f1e9586d9d545f8547d3f09ff33dce48d 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.h
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.h
@@ -45,6 +45,9 @@ class SelectFileDialogLinuxPortal : public SelectFileDialogLinux {
// availability test has not yet completed.
static bool IsPortalAvailable();
+ // Get version of portal if available.
+ static uint32_t GetPortalVersion();
+
protected:
~SelectFileDialogLinuxPortal() override;

View File

@@ -9,7 +9,7 @@ embedders to make custom schemes allow V8 code cache.
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665
diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc
index cad3cf44df0c65067d18490ee7694fd0f82153af..0f9b64a81e0c4114bd885b24ff65c458810ceb99 100644
index d6ddb79521290790aeb8fbd997117cf3c6157c75..52a9536f4187418327f980fd3dd68211d8103374 100644
--- a/content/browser/code_cache/generated_code_cache.cc
+++ b/content/browser/code_cache/generated_code_cache.cc
@@ -8,6 +8,7 @@

View File

@@ -347,10 +347,10 @@ index d13e6db4857242480591bff040709532d16f513d..1164da12ee71a8575c17bf1b84a505e8
// launch failed.
enum class LaunchState {
diff --git a/content/browser/service_host/utility_sandbox_delegate.cc b/content/browser/service_host/utility_sandbox_delegate.cc
index 824afc2cfd01a0321d1b01cd370243dafefa1d24..ab77c85595dd5bde9eb9fd21f4914e1f9dfd4433 100644
index 5ff3c5dcb972eb635107557ea7c26eb1f3331d22..5b1939226dcb84a61b09eefe69ab24a5ad595e1b 100644
--- a/content/browser/service_host/utility_sandbox_delegate.cc
+++ b/content/browser/service_host/utility_sandbox_delegate.cc
@@ -38,17 +38,19 @@ UtilitySandboxedProcessLauncherDelegate::
@@ -39,17 +39,19 @@ UtilitySandboxedProcessLauncherDelegate::
UtilitySandboxedProcessLauncherDelegate(
sandbox::mojom::Sandbox sandbox_type,
const base::EnvironmentMap& env,
@@ -374,7 +374,7 @@ index 824afc2cfd01a0321d1b01cd370243dafefa1d24..ab77c85595dd5bde9eb9fd21f4914e1f
#if DCHECK_IS_ON()
bool supported_sandbox_type =
sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
@@ -114,11 +116,28 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
@@ -115,11 +117,28 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
return sandbox_type_;
}

View File

@@ -307,7 +307,7 @@ index 2c2f4f405074e5baa4a26f255283404f86b40e21..ebeb7d6988ee9e6a4e78cb82fc01fdad
ContouredRect PixelSnappedContouredBorderInternal(
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index 6718aad4a16cd99c8dd7118ca62cebd29ffbfe97..39d426936b266d8f44ab8a614a48247462ceea2d 100644
index b5a309cb7bad79f80fb43dcbcccbd8dc2fcdfef8..c90d8f2f283e9bd05184171d3971d0060731f67d 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1658,6 +1658,8 @@ component("platform") {

View File

@@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index d29bdc038fc6934c69b10b7a694d9cbf54839b02..6cc09172e0975387d614f67350215c80915c406d 100644
index 3c43af49c5d6d5f604c71e9a9dc1f7afe9aaf0f7..857e422776e7ec33eaf4c9983d42d6433b7723cc 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -178,6 +178,8 @@ viz_component("service") {

View File

@@ -78,7 +78,7 @@ index 3d388a85aaf52acdcc2b7aaea56f5a24b2435bff..7a0d28cbf1651e76a4356f1193b502d2
}
diff --git a/crypto/apple_keychain.h b/crypto/apple_keychain.h
index c2aeebc449c7cc2d2e2fcd30dde3e8b9732aa0b3..4acd945d31cb6cb5f3c74548ef9b9cc23ee80205 100644
index 605a6db7fd8de4e9863d1b98c78bb628e9600987..dccc5f565733875b1c9e54cbff7383eafd5370e4 100644
--- a/crypto/apple_keychain.h
+++ b/crypto/apple_keychain.h
@@ -18,6 +18,12 @@
@@ -94,35 +94,65 @@ index c2aeebc449c7cc2d2e2fcd30dde3e8b9732aa0b3..4acd945d31cb6cb5f3c74548ef9b9cc2
// DEPRECATED: use `AppleKeychainV2` instead.
// Wraps the KeychainServices API in a very thin layer, to allow it to be
// mocked out for testing.
@@ -43,11 +49,16 @@ class CRYPTO_EXPORT AppleKeychain {
@@ -46,13 +52,18 @@ class CRYPTO_EXPORT AppleKeychain {
// std::vector<uint8_t> arm is populated instead.
virtual base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const;
- std::string_view account_name) const = 0;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item = nullptr) const;
+ AppleSecKeychainItemRef* item = nullptr) const = 0;
virtual OSStatus AddGenericPassword(
std::string_view service_name,
std::string_view account_name,
base::span<const uint8_t> password) const = 0;
virtual OSStatus AddGenericPassword(std::string_view service_name,
std::string_view account_name,
base::span<const uint8_t> password) const;
+
+#if BUILDFLAG(IS_MAC)
+ virtual OSStatus ItemDelete(AppleSecKeychainItemRef item) const;
+#endif // !BUILDFLAG(IS_MAC)
+
protected:
AppleKeychain();
};
diff --git a/crypto/apple_keychain_secitem.h b/crypto/apple_keychain_secitem.h
index 1632c22c669607f9da8b4fe7783ee716c6467f6e..3f0e3e0af568627a0aae352a65be4cc7d5d40802 100644
--- a/crypto/apple_keychain_secitem.h
+++ b/crypto/apple_keychain_secitem.h
@@ -17,7 +17,8 @@ class CRYPTO_EXPORT AppleKeychainSecItem : public AppleKeychain {
#if BUILDFLAG(IS_MAC)
diff --git a/crypto/apple_keychain_mac.cc b/crypto/apple_keychain_mac.cc
index 0613e22fc0ce35378dc3580d797badd5f2680ae6..3ec4a2ba2fa5679363fabfa007be6200a0660ce7 100644
--- a/crypto/apple_keychain_mac.cc
+++ b/crypto/apple_keychain_mac.cc
@@ -58,14 +58,15 @@ AppleKeychain::~AppleKeychain() = default;
base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const override;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const override;
OSStatus AddGenericPassword(
std::string_view service_name,
diff --git a/crypto/apple_keychain_secitem.mm b/crypto/apple_keychain_secitem.mm
index 12b400a1f2d6c11bc4ac67d0a2c98984d0be24e0..1abb4623bfabacbca34068113fac2030fea2c065 100644
--- a/crypto/apple_keychain_secitem.mm
+++ b/crypto/apple_keychain_secitem.mm
@@ -118,7 +118,8 @@
base::expected<std::vector<uint8_t>, OSStatus>
AppleKeychain::FindGenericPassword(std::string_view service_name,
- std::string_view account_name) const {
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const {
AppleKeychainSecItem::FindGenericPassword(std::string_view service_name,
- std::string_view account_name) const {
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const {
base::apple::ScopedCFTypeRef<CFDictionaryRef> query =
MakeGenericPasswordQuery(service_name, account_name);
diff --git a/crypto/apple_keychain_seckeychain.cc b/crypto/apple_keychain_seckeychain.cc
index c7f015a4108f93ef121c7bb56c3d67634a723146..6d905154de42cbc151b5dfd77af277e5a5b021a0 100644
--- a/crypto/apple_keychain_seckeychain.cc
+++ b/crypto/apple_keychain_seckeychain.cc
@@ -26,14 +26,15 @@ AppleKeychainSecKeychain::~AppleKeychainSecKeychain() = default;
base::expected<std::vector<uint8_t>, OSStatus>
AppleKeychainSecKeychain::FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const {
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const {
base::AutoLock lock(GetMacSecurityServicesLock());
uint32_t password_length = 0;
void* password_data = nullptr;
@@ -134,7 +164,7 @@ index 0613e22fc0ce35378dc3580d797badd5f2680ae6..3ec4a2ba2fa5679363fabfa007be6200
if (status != noErr) {
return base::unexpected(status);
}
@@ -91,6 +92,11 @@ OSStatus AppleKeychain::AddGenericPassword(
@@ -59,6 +60,11 @@ OSStatus AppleKeychainSecKeychain::AddGenericPassword(
password.data(), nullptr);
}
@@ -143,14 +173,28 @@ index 0613e22fc0ce35378dc3580d797badd5f2680ae6..3ec4a2ba2fa5679363fabfa007be6200
+ return SecKeychainItemDelete(item);
+}
+
ScopedKeychainUserInteractionAllowed::ScopedKeychainUserInteractionAllowed(
Boolean allowed,
OSStatus* status) {
#pragma clang diagnostic pop
} // namespace crypto
diff --git a/crypto/apple_keychain_seckeychain.h b/crypto/apple_keychain_seckeychain.h
index ecf5e229c8f05a27574b635abc9c781d175c1773..6afb09c59011035337a287783bbef0c6b7d29d9a 100644
--- a/crypto/apple_keychain_seckeychain.h
+++ b/crypto/apple_keychain_seckeychain.h
@@ -20,7 +20,8 @@ class CRYPTO_EXPORT AppleKeychainSecKeychain : public AppleKeychain {
base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const override;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const override;
OSStatus AddGenericPassword(
std::string_view service_name,
diff --git a/crypto/mock_apple_keychain.cc b/crypto/mock_apple_keychain.cc
index 9b48805aacd161ff8d5550edf993217d5c6acfad..3b9fa4dc7f020740edb55a5aa80c9b526e4f585b 100644
index d766dc41299f32bc766e4efce5925c93f21b60c5..7f09d477ba152cbca798f3ef7a213786cc95a338 100644
--- a/crypto/mock_apple_keychain.cc
+++ b/crypto/mock_apple_keychain.cc
@@ -30,7 +30,8 @@ MockAppleKeychain::~MockAppleKeychain() = default;
@@ -32,7 +32,8 @@ MockAppleKeychain::~MockAppleKeychain() = default;
base::expected<std::vector<uint8_t>, OSStatus>
MockAppleKeychain::FindGenericPassword(std::string_view service_name,

View File

@@ -28,10 +28,10 @@ The patch should be removed in favor of either:
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 8a0e2b9520654002578a673bb22c9def4caa0d26..b2a28eb0276211d2949fb1b8b74cf098ae5aba41 100644
index 0dbbaddc1bef8b5a1b253297f47c33601dc6fe67..0c84f727b29c742ba4c2edd38dfa16d1f48df76f 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -11151,6 +11151,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
@@ -11110,6 +11110,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
"blob");
}

View File

@@ -75,10 +75,10 @@ index 659e8d79766a78d261e58adab08f9abccda8390b..bc4dc2e3a93877d2e20890560f61d3f2
PictureInPictureOcclusionTracker*
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index dde04e0070cfd0a294d88fad3c32eadacf4030e8..de6816ba24a300b936c5ddbc1b5f1dd0f4865a9c 100644
index 106f2c27297ab437839b3e320a5e5c657947b1c3..f2d4bb25647e9075df68ace24ed910d62a90c89e 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -431,11 +431,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
@@ -432,11 +432,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
#endif // BUILDFLAG(IS_WIN)

View File

@@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4
// The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d0f80de98c2bd3cf686b05ef972c89a8c2276935..05859e343a6c1fa58f3fb847ad6e97982804f910 100644
index 05a102a33f4c05fe6d34fa721d37fcae05a3a577..459fc0eff0bfe2ec005d6f34cf7e91c2d601fd06 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9997,7 +9997,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -9970,7 +9970,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

View File

@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 3419628c08b62a16c62778cc124c365aa19adec2..b1143074421e4ac37f1dc7041104bea3de1eaa4b 100644
index 8c3ac60d029a76b004111cffd56e9b859594dd65..d398cb9f429f8304eeb6ed00c79e609a3b83bd3f 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2120,9 +2120,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
@@ -2121,9 +2121,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
// The resize message (which may not happen immediately) will carry with it
// the screen info as well as the new size (if the screen has changed scale

View File

@@ -20,7 +20,7 @@ index fc9cb7e68bdad4c40fab63f70243e09ad005ab80..199fbceda530da31aab9126d78b4bd21
injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
}
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 8db7be4dbc924c719783ceb667e4f5708ea0133e..d8622012721795c76831bf33c62ce393e81badbb 100644
index 6ea4a0f04eab4e85ec4c9b67f50c5c4e5c6e01e1..5f055fe422904c95e05af5cb0e92241a5d9d53c1 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -461,6 +461,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -59,7 +59,7 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index fbfd4d96e8082df8c5db5d354ac7c39bc329d4ee..c8be9f437cc19668f8349e8777135e66a67fb9cb 100644
index dd148eb3cce762d20e9117b4f8030c881057b8bb..e626d63f295b2d0fa62b179c76c45df125bbaeeb 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3113,6 +3113,7 @@ void LocalFrame::RequestExecuteScript(
@@ -215,7 +215,7 @@ index 5e12b61ba14cd1afb07b71ff15e73e905da0addc..685a2ebb6694c173471d045014932125
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
}
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index dcab8b2d4adcf14b285b558d85f69c303dc0818a..c998cba53d57dda9c32e7f75a9de3dcf0b974f58 100644
index dd0c441d45ebb30c5a32822365f2ebe273b8cd16..164daddaccb84a28cf4bd387f382afddfc2613d3 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1111,14 +1111,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -237,7 +237,7 @@ index dcab8b2d4adcf14b285b558d85f69c303dc0818a..c998cba53d57dda9c32e7f75a9de3dcf
bool WebLocalFrameImpl::IsInspectorConnected() {
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 1d50260fb58eb439d68506de7de04b78c616b6ee..3699e331d5cb15ca12b6fa2d2ba058f7ca74df40 100644
index 87d933b2e413f404a9b80480bdf676eb0c8a2bfa..17329fb46c0d19645ad5411bbfba33dadfea4529 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -198,6 +198,7 @@ class CORE_EXPORT WebLocalFrameImpl final
@@ -249,10 +249,10 @@ index 1d50260fb58eb439d68506de7de04b78c616b6ee..3699e331d5cb15ca12b6fa2d2ba058f7
mojom::blink::WantResultOption,
mojom::blink::PromiseResultOption) override;
diff --git a/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc b/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc
index 4eb146c0798514e9201f2d68dcfebfacc82b97ea..27398228f87982e5c53476d5dee13fde5a6fa64e 100644
index 5e66719cf6d8170039c011ad03d56ea55ee8f2cb..5a71dd5172c88aed1498dea02f790a7f278ac174 100644
--- a/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc
+++ b/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc
@@ -63,6 +63,7 @@ class VirtualTimeTest : public SimTest {
@@ -59,6 +59,7 @@ class VirtualTimeTest : public SimTest {
mojom::blink::LoadEventBlockingOption::kDoNotBlock,
WTF::BindOnce(&ScriptExecutionCallbackHelper::Completed,
base::Unretained(&callback_helper)),

View File

@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index d26c850e28b7df6992bf07fda2abe260ed4da769..008c131e5b4f84daeaee5ffe6ab7ae8836725ea5 100644
index b61dfcc8e3306a2c3eb8808c204254af4ad8c248..cec49ddafd46b0296cc548a17efd67527a48f157 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4782,6 +4782,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4684,6 +4684,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -20,10 +20,10 @@ index d26c850e28b7df6992bf07fda2abe260ed4da769..008c131e5b4f84daeaee5ffe6ab7ae88
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index cabdb73fa092683cdd2dad38f7b62b6bac974d0d..6bd13985764981ccbc547faccdec78bce18600a0 100644
index 5ed4df05dd22cbf901ecbbcc9d892de806c93890..d0623992ce30b29b088a1b92e503f9e29087f193 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -340,6 +340,11 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -341,6 +341,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default;

View File

@@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index 342b54311138a3d156bc19e8428e79d6a1477b80..9bd726519ef854f577d5a84eaca489b021e9dba8 100644
index e9d1729c376bc36ac2c5b0a2c03ae03eb7e3dbff..18f1797d64573ee676e7f3337256d3199f91f29f 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1508,6 +1508,11 @@

View File

@@ -6,7 +6,7 @@ Subject: gtk_visibility.patch
Allow electron to depend on GTK in the GN build.
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
index 4498487579ba5f4c7d8292f65c1afed16e41bb03..4ea4f38a91f02700373cb97e39125dcb0469b70b 100644
index fdc3442590bddda969681d49c451d32f086bd5d1..b6fd63c0c845e5d7648e8693f1639b1f0f39a779 100644
--- a/build/config/linux/gtk/BUILD.gn
+++ b/build/config/linux/gtk/BUILD.gn
@@ -27,6 +27,7 @@ pkg_config("gtk_internal_config") {

View File

@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 108d33c2e6380749b80631b57931af6beaf44404..ad7b3f3a4e0190983ee68b1503a38847d9f94014 100755
index f274064efd55d7c4691e207c7274f2cee677f4d8..a69cc4107d94268190a0f19a6e53dae231e227ef 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -307,6 +307,8 @@ def GetDefaultHostOs():

View File

@@ -7,10 +7,10 @@ Allows embedders to get a handle to the gdk_pixbuf
library already loaded in the process.
diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc
index f28cf275db0205186fe6143b7e1550b6c30a4435..346992e202c507eeac454d657507e1bd336175fc 100644
index 946eb3eef6b0c546ace65de0c7f14b4642208090..9c9a35d439602ea3612ed648931990ec224c8799 100644
--- a/ui/gtk/gtk_compat.cc
+++ b/ui/gtk/gtk_compat.cc
@@ -69,11 +69,6 @@ void* GetLibGio() {
@@ -70,11 +70,6 @@ void* GetLibGio() {
return libgio;
}
@@ -22,7 +22,7 @@ index f28cf275db0205186fe6143b7e1550b6c30a4435..346992e202c507eeac454d657507e1bd
void* GetLibGdk3() {
static void* libgdk3 = DlOpen("libgdk-3.so.0");
return libgdk3;
@@ -150,6 +145,11 @@ gfx::Insets InsetsFromGtkBorder(const GtkBorder& border) {
@@ -170,6 +165,11 @@ gfx::Insets InsetsFromGtkBorder(const GtkBorder& border) {
} // namespace

View File

@@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index a6cbbaa18ab6631aff7d76873077d2e15cbedeb6..db6fac3683f2737d05c5bc2dabfcc4b669a8a6d1 100644
index 5267ae3844f58d17e795c17184c85592157fda6f..21cab5e75e92570260df2e5fe4d2e404d2cb020a 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1045,6 +1045,7 @@ component("base") {
@@ -1046,6 +1046,7 @@ component("base") {
"//build:ios_buildflags",
"//build/config/compiler:compiler_buildflags",
"//third_party/modp_b64",
@@ -477,7 +477,7 @@ index ff96d22a11051391423f4a49c7b1478b8176baf8..c7e640e968f8ef183d48a226d43cdac8
// Beware: This view was briefly removed (in favor of a bare CALayer) in
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index e522423645bf313ad1504a7ec47ecf3619888e35..d29bdc038fc6934c69b10b7a694d9cbf54839b02 100644
index 15297546aa2641af1a249ff99bcf51764b107dbd..3c43af49c5d6d5f604c71e9a9dc1f7afe9aaf0f7 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -385,6 +385,7 @@ viz_component("service") {
@@ -548,7 +548,7 @@ index dbf334caa3a6d10017b69ad76802e389a011436b..da828823e8195cc9e497866363c9af93
void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event,
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 371b7b3ba73ee7b88027fcc31cb0a346cae40eea..c4b0654a56f4f2b4ab57ef05a119e38862b5fd2d 100644
index f97ab6bdafbc35216b1935cf979443d071dd889f..e72d2347099c6549b5f9f318f99a1140839939e7 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -36,6 +36,7 @@
@@ -559,7 +559,7 @@ index 371b7b3ba73ee7b88027fcc31cb0a346cae40eea..c4b0654a56f4f2b4ab57ef05a119e388
#include "skia/ext/skia_utils_mac.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/input/input_handler.mojom.h"
@@ -2138,15 +2139,21 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -2144,15 +2145,21 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@@ -582,10 +582,10 @@ index 371b7b3ba73ee7b88027fcc31cb0a346cae40eea..c4b0654a56f4f2b4ab57ef05a119e388
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index bdc48f4549ce6f82c5558b3c9e70c5c5a92c4faa..d10a5afe9da445b6fb940a46252efa8e0c36bcb4 100644
index 86e30304014f4811578595013a20a76790b1e84d..7964ac6af0fc3821b8208e34be766a712ccd2026 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -342,6 +342,7 @@ source_set("browser") {
@@ -343,6 +343,7 @@ source_set("browser") {
"//ui/webui/resources",
"//v8",
"//v8:v8_version",
@@ -797,10 +797,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 4c59b6c62ad3fed9717b0330c7b46b8dc83a51a1..1c88c8f449387258259bcd65c13709d70f03117b 100644
index d72fc747932acd8cca621cd4bbfd3cb244c17da9..58687ab05e82b6d6314c979c88d77323dd7047e4 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -662,6 +662,7 @@ static_library("test_support") {
@@ -664,6 +664,7 @@ static_library("test_support") {
"//url",
"//url/mojom:url_mojom_gurl",
"//v8",
@@ -808,7 +808,7 @@ index 4c59b6c62ad3fed9717b0330c7b46b8dc83a51a1..1c88c8f449387258259bcd65c13709d7
]
data_deps = [
@@ -1117,6 +1118,7 @@ static_library("browsertest_support") {
@@ -1120,6 +1121,7 @@ static_library("browsertest_support") {
}
configs += [ "//v8:external_startup_data" ]
@@ -816,7 +816,7 @@ index 4c59b6c62ad3fed9717b0330c7b46b8dc83a51a1..1c88c8f449387258259bcd65c13709d7
}
mojom("content_test_mojo_bindings") {
@@ -1959,6 +1961,7 @@ test("content_browsertests") {
@@ -1962,6 +1964,7 @@ test("content_browsertests") {
"//ui/shell_dialogs",
"//ui/snapshot",
"//ui/webui:test_support",
@@ -824,7 +824,7 @@ index 4c59b6c62ad3fed9717b0330c7b46b8dc83a51a1..1c88c8f449387258259bcd65c13709d7
]
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
@@ -3284,6 +3287,7 @@ test("content_unittests") {
@@ -3292,6 +3295,7 @@ test("content_unittests") {
"//ui/shell_dialogs:shell_dialogs",
"//ui/webui:test_support",
"//url",
@@ -833,10 +833,10 @@ index 4c59b6c62ad3fed9717b0330c7b46b8dc83a51a1..1c88c8f449387258259bcd65c13709d7
if (enable_nocompile_tests) {
diff --git a/content/web_test/BUILD.gn b/content/web_test/BUILD.gn
index c17535742efb9a229120953ecb00c73ad391c07d..8142161f2ed49d7ce4f3785b86d846bf0728a92f 100644
index dacf6fe8bbb3008e548a757aafaebc0d0a5cd66e..1e06aed0d22e460e5b5ad3bf72d767295454ddcf 100644
--- a/content/web_test/BUILD.gn
+++ b/content/web_test/BUILD.gn
@@ -229,6 +229,7 @@ static_library("web_test_browser") {
@@ -231,6 +231,7 @@ static_library("web_test_browser") {
"//ui/gl",
"//ui/shell_dialogs:shell_dialogs",
"//url",
@@ -1436,7 +1436,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228
} // namespace sandbox
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index 3ff395b3ff3b646a64c43503d2c172776bf68c84..e40030307e8d9df7e00a402e241e00664b236c7d 100644
index f2b874b368c6857013f6fbb7522d5d590f0540b5..1593565d61d284902ea364bf7bbee065e95acb48 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -414,6 +414,7 @@ component("core") {
@@ -1678,7 +1678,7 @@ index 6846060ef9622d8fc8d1d6c8da16e2f1b785e6bd..05c22db87e882b246bd7034e027cf149
// Accessible object
if (AXElementWrapper::IsValidElement(value)) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index dfca458adb5b38cb1e597c16e9e6b6cc1521dea2..2372ff1193d1d52b719b6ee311cc07ac472a2f8d 100644
index d2bd63f57da9b3ff84ebe36053ec18978d86c9f3..a6261be96e00548af7eba8a5fc7461586b9dbf53 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -365,6 +365,13 @@ component("base") {
@@ -1695,7 +1695,7 @@ index dfca458adb5b38cb1e597c16e9e6b6cc1521dea2..2372ff1193d1d52b719b6ee311cc07ac
if (is_ios) {
sources += [
"device_form_factor_ios.mm",
@@ -518,6 +525,12 @@ component("base") {
@@ -511,6 +518,12 @@ component("base") {
"//url",
]

View File

@@ -133,7 +133,7 @@ index 5be62a3fb27e37f3c1db6b811172f6dfebe18f61..34349f9832fe4b9a3d48db613a789afb
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 6606217ec587846d995c4312f9a6ecd0a82b9ba1..63c4c7d56dd8677f37c2eed64166647c17b26d1c 100644
index 3b2c512edec286bcc283a1cff14d96d469d8b4db..6e435b12521d663086be770bb89106368b06d159 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2217,7 +2217,7 @@ void RenderProcessHostImpl::CreateNotificationService(

View File

@@ -10,10 +10,10 @@ an about:blank check to this area.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 78b55aa09b6db29119a0f47e11ea157e8b0c6d3b..deb02736cf52536d1c65255146ee077650d18095 100644
index fea0bbb8a9604ffbc4d8c5f061baff81c4824cde..a9f6d2233ce9953d1e1d96aea3a2ee717adbdc3b 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -807,8 +807,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
@@ -809,8 +809,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
// TODO(crbug.com/40092527): Consider adding a separate boolean that
// tracks this instead of piggybacking `origin_calculation_debug_info`.
if (renderer_side_origin.opaque() &&

View File

@@ -38,7 +38,7 @@ index 8168b4cfbafd42fa93a5aa9a3691c2552fabfb86..ba49212bd76d209f99c1cee649fc1466
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 2878aa40f60e977ecd2f7eedd37d1ce199472cf4..dde04e0070cfd0a294d88fad3c32eadacf4030e8 100644
index c80abff87a34a8dfb94eec4c856438b458ad7936..106f2c27297ab437839b3e320a5e5c657947b1c3 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -19,9 +19,11 @@
@@ -53,7 +53,7 @@ index 2878aa40f60e977ecd2f7eedd37d1ce199472cf4..dde04e0070cfd0a294d88fad3c32eada
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_button.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
@@ -72,7 +74,7 @@
@@ -73,7 +75,7 @@
#include "ui/aura/window.h"
#endif
@@ -62,7 +62,7 @@ index 2878aa40f60e977ecd2f7eedd37d1ce199472cf4..dde04e0070cfd0a294d88fad3c32eada
#include "chrome/browser/shell_integration_win.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/aura/window.h"
@@ -396,7 +398,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
@@ -397,7 +399,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady();
@@ -71,3 +71,16 @@ index 2878aa40f60e977ecd2f7eedd37d1ce199472cf4..dde04e0070cfd0a294d88fad3c32eada
std::wstring app_user_model_id;
Browser* browser = chrome::FindBrowserWithTab(controller->GetWebContents());
if (browser) {
@@ -1099,10 +1101,12 @@ void VideoOverlayWindowViews::SetUpViews() {
l10n_util::GetStringUTF16(
IDS_PICTURE_IN_PICTURE_LIVE_CAPTION_CONTROL_TEXT));
live_caption_button->SetSize(kActionButtonSize);
+#if 0
live_caption_dialog = std::make_unique<OverlayWindowLiveCaptionDialog>(
Profile::FromBrowserContext(
controller_->GetWebContents()->GetBrowserContext()));
live_caption_dialog->SetVisible(false);
+#endif
toggle_microphone_button =
std::make_unique<ToggleMicrophoneButton>(base::BindRepeating(
[](VideoOverlayWindowViews* overlay) {

View File

@@ -881,10 +881,10 @@ index 97cb6458bc9eec767db89b56abfc5f4b4136ff7b..d9a0b343158b8464b5c9aa8e0e655c0b
ScriptingThrottler scripting_throttler_;
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index d10a5afe9da445b6fb940a46252efa8e0c36bcb4..6cfd8d6e9a38da8adfa05075097cc491962bd8f7 100644
index 7964ac6af0fc3821b8208e34be766a712ccd2026..5bb585cb7f0ec4e15038bba89179817d43256719 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3157,8 +3157,9 @@ source_set("browser") {
@@ -3158,8 +3158,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View File

@@ -30,10 +30,10 @@ index a54a0dedf8ef1cfffa4e80a4707debed0e83d277..e66e71fdbabb40a5307b12cd8965e773
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 8637d83c1d3a912bbc48effcc095b426640351ad..3419628c08b62a16c62778cc124c365aa19adec2 100644
index bac913e30ce140d9b370186781cccf5817885076..8c3ac60d029a76b004111cffd56e9b859594dd65 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2054,6 +2054,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -2055,6 +2055,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_) {
view_->UpdateCursor(cursor);
}
@@ -44,10 +44,10 @@ index 8637d83c1d3a912bbc48effcc095b426640351ad..3419628c08b62a16c62778cc124c365a
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index fec569763d3ba8b171ca65a9ea523ada5f729f41..e236eb74db68a6c11892e1ea16cab05b8c47afbf 100644
index aec96f969800e2a4d09e644df770d367e48b1b63..c1c3db2992038cad0c01ce65c57676f8fe281830 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5883,6 +5883,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -5884,6 +5884,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@@ -60,10 +60,10 @@ index fec569763d3ba8b171ca65a9ea523ada5f729f41..e236eb74db68a6c11892e1ea16cab05b
RenderWidgetHostImpl* render_widget_host) {
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index c0a0400ae804dca3679bf8e98dc06effcc96dfe0..2e305bca22ed140a8fe28077f611b845c5478a88 100644
index 91f52c79054c184142d15cfad6b24330a365c167..51cc85f9c998cc9234700ec47065d69eaac8d474 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1186,6 +1186,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -1183,6 +1183,7 @@ class CONTENT_EXPORT WebContentsImpl
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;

View File

@@ -1,40 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Wed, 9 Jun 2021 14:28:08 -0500
Subject: refactor: restore base::AdaptCallbackForRepeating
Undo https://chromium-review.googlesource.com/c/chromium/src/+/2941842
to reinstate base::AdaptCallbackForRepeating(). It was removed to fix
https://bugs.chromium.org/p/chromium/issues/detail?id=730593 .
We use AdaptCallbackForRepeating() in about a dozen places. This patch
should be removed as soon as those have been updated. Patching because
every instance is a FTBFS that prevents testing any one instance's fix.
diff --git a/base/functional/callback_helpers.h b/base/functional/callback_helpers.h
index f1aa11fec7c0994ac19a26a02800f25de8f2f519..bbfdb3e4839ed96e4c6238235458a421c917411f 100644
--- a/base/functional/callback_helpers.h
+++ b/base/functional/callback_helpers.h
@@ -99,6 +99,22 @@ RepeatingCallback<void(Args...)> ForwardRepeatingCallbacks(
std::move(v));
}
+// Wraps the given OnceCallback into a RepeatingCallback that relays its
+// invocation to the original OnceCallback on the first invocation. The
+// following invocations are just ignored.
+//
+// Note that this deliberately subverts the Once/Repeating paradigm of Callbacks
+// but helps ease the migration from old-style Callbacks. Avoid if possible; use
+// if necessary for migration. TODO(tzik): Remove it. https://crbug.com/730593
+template <typename... Args>
+RepeatingCallback<void(Args...)> AdaptCallbackForRepeating(
+ OnceCallback<void(Args...)> callback) {
+ using Helper = internal::OnceCallbackHolder<Args...>;
+ return base::BindRepeating(
+ &Helper::Run, std::make_unique<Helper>(std::move(callback),
+ /*ignore_extra_runs=*/true));
+}
+
// Wraps the given OnceCallback and returns two OnceCallbacks with an identical
// signature. On first invokation of either returned callbacks, the original
// callback is invoked. Invoking the remaining callback results in a crash.

View File

@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
accessed from our JS event. The filtering is moved into Electron's code.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5fef3e077072ee9dc3ff22110b7818503c8b4e4b..2d3fc900a04e6ddc291548a37aaf2322ccbc4846 100644
index 35de681eac3f65ce3e0435bd984159154ece2b7f..f2d5a85376109b6127ca4a7b3c26dbbb61990e20 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10134,25 +10134,13 @@ void WebContentsImpl::RendererUnresponsive(
@@ -10107,25 +10107,13 @@ void WebContentsImpl::RendererUnresponsive(
base::RepeatingClosure hang_monitor_restarter) {
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
"render_widget_host", render_widget_host);

View File

@@ -8,7 +8,7 @@ respond to the first mouse click in their window, which is desirable for some
kinds of utility windows. Similarly for `disableAutoHideCursor`.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 91e5beaa68fc0b8231fce4bf195efa924744a532..371b7b3ba73ee7b88027fcc31cb0a346cae40eea 100644
index a606a4870bd3f504c4bd6316aa3ab833621ab205..f97ab6bdafbc35216b1935cf979443d071dd889f 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -171,6 +171,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -27,7 +27,7 @@ index 91e5beaa68fc0b8231fce4bf195efa924744a532..371b7b3ba73ee7b88027fcc31cb0a346
// RenderWidgetHostViewCocoa ---------------------------------------------------
// Private methods:
@@ -776,6 +785,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
@@ -782,6 +791,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -37,7 +37,7 @@ index 91e5beaa68fc0b8231fce4bf195efa924744a532..371b7b3ba73ee7b88027fcc31cb0a346
// Enable "click-through" if mouse clicks are accepted in inactive windows
return [self acceptsMouseEventsOption] > kAcceptMouseEventsInActiveWindow;
}
@@ -921,6 +933,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -927,6 +939,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@@ -48,7 +48,7 @@ index 91e5beaa68fc0b8231fce4bf195efa924744a532..371b7b3ba73ee7b88027fcc31cb0a346
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -1255,6 +1271,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -1261,6 +1277,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSEventTypeKeyDown &&
!(modifierFlags & NSEventModifierFlagCommand);

View File

@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 63c4c7d56dd8677f37c2eed64166647c17b26d1c..9df359cf6f5b71259d1df6d7e0fd8044bfa1ff73 100644
index 6e435b12521d663086be770bb89106368b06d159..2c53f5575bdc96ba53bacf8a40e752e7a41576d9 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1825,6 +1825,10 @@ bool RenderProcessHostImpl::Init() {

View File

@@ -9,10 +9,10 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index b2d5733ff8c47f497af03171d9dfac68b2013e4d..52b782a40724ab6d8cd9abf2193aeb1a14a5d8e9 100644
index 2ad1479de622d956c701d8dc4adb75d0114f65b1..3d4510df709ed60a1da7163d3226541ed8ff201c 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3952,6 +3952,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3953,6 +3953,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@@ -26,7 +26,7 @@ index b2d5733ff8c47f497af03171d9dfac68b2013e4d..52b782a40724ab6d8cd9abf2193aeb1a
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3962,6 +3969,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3963,6 +3970,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}

View File

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index df50b84cca214a9b6a85afe2fd677a45e2529cdc..78b55aa09b6db29119a0f47e11ea157e8b0c6d3b 100644
index 46ddad111b2feb5cc1064a1eeb424800d2cba6c1..fea0bbb8a9604ffbc4d8c5f061baff81c4824cde 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8881,6 +8881,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -8883,6 +8883,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@@ -37,10 +37,10 @@ index df50b84cca214a9b6a85afe2fd677a45e2529cdc..78b55aa09b6db29119a0f47e11ea157e
if (had_fullscreen_token && !GetView()->HasFocus())
GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 52b782a40724ab6d8cd9abf2193aeb1a14a5d8e9..d0f80de98c2bd3cf686b05ef972c89a8c2276935 100644
index 3d4510df709ed60a1da7163d3226541ed8ff201c..05a102a33f4c05fe6d34fa721d37fcae05a3a577 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4227,21 +4227,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
@@ -4228,21 +4228,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const input::NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent");
@@ -78,7 +78,7 @@ index 52b782a40724ab6d8cd9abf2193aeb1a14a5d8e9..d0f80de98c2bd3cf686b05ef972c89a8
}
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4400,7 +4404,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -4401,7 +4405,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame));
DCHECK(requesting_frame->IsActive());

View File

@@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
patching legacy devtools code.
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
index 20ffe01d89e65b3eb6dc97b75761166ae3c9acb9..0444f2d81e53a01a81861c158713336a8062434f 100644
index 69673b4aa636c2b55065aa11ce65dbc4a45c39b8..bdf133c0cdd524a72d3ad78fa97102b44c336f51 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -736,6 +736,8 @@ export class MainImpl {
@@ -730,6 +730,8 @@ export class MainImpl {
globalThis.Main = globalThis.Main || {};
// @ts-expect-error Exported for Tests.js
globalThis.Main.Main = MainImpl;

View File

@@ -38,14 +38,10 @@ build_use_third_party_simdutf.patch
fix_remove_fastapitypedarray_usage.patch
test_handle_explicit_resource_management_globals.patch
linux_try_preadv64_pwritev64_before_preadv_pwritev_4683.patch
build_remove_explicit_linker_call_to_libm_on_macos.patch
build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch
test_make_eval_snapshot_tests_more_flexible.patch
build_option_to_use_custom_inspector_protocol_path.patch
fix_adjust_wpt_and_webidl_tests_for_enabled_float16array.patch
chore_add_createexternalizabletwobytestring_to_globals.patch
feat_add_oom_error_callback_in_node_isolatesettings.patch
fix_-wnonnull_warning.patch
refactor_attach_cppgc_heap_on_v8_isolate_creation.patch
fix_ensure_traverseparent_bails_on_resource_path_exit.patch
cli_move_--trace-atomics-wait_to_eol.patch
@@ -53,3 +49,4 @@ fix_cppgc_initializing_twice.patch
fix_task_starvation_in_inspector_context_test.patch
zlib_fix_pointer_alignment.patch
fix_expose_readfilesync_override_for_modules.patch
test_force_slow_json_stringify_path_for_overflow.patch

View File

@@ -54,71 +54,11 @@ index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3f
}
assert(!node_enable_inspector || node_use_openssl,
diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni
index 5d87f3c901ab509e534598ed1eb0796a96355b5e..3d7aa148678b2646b88fa7c32abec91791b02b82 100644
--- a/src/inspector/unofficial.gni
+++ b/src/inspector/unofficial.gni
@@ -13,7 +13,7 @@ template("inspector_gn_build") {
}
node_gen_dir = get_label_info("../..", "target_gen_dir")
- protocol_tool_path = "../../tools/inspector_protocol"
+ protocol_tool_path = "../../deps/inspector_protocol"
gypi_values = exec_script(
"../../tools/gypi_to_gn.py",
@@ -35,6 +35,8 @@ template("inspector_gn_build") {
]
args = [
+ "--inspector_protocol_dir",
+ rebase_path(protocol_tool_path, root_build_dir),
"--jinja_dir",
# jinja is in third_party.
rebase_path("//third_party/", root_build_dir),
@@ -72,4 +74,37 @@ template("inspector_gn_build") {
outputs = [ "$node_gen_dir/src/{{source_name_part}}.json" ]
args = [ "{{source}}" ] + rebase_path(outputs, root_build_dir)
}
+
+ config("crdtp_config") {
+ include_dirs = [ protocol_tool_path ]
+ }
+
+ static_library("crdtp") {
+ public_configs = [ ":crdtp_config" ]
+ sources = [
+ "$protocol_tool_path/crdtp/cbor.cc",
+ "$protocol_tool_path/crdtp/cbor.h",
+ "$protocol_tool_path/crdtp/dispatch.cc",
+ "$protocol_tool_path/crdtp/dispatch.h",
+ "$protocol_tool_path/crdtp/error_support.cc",
+ "$protocol_tool_path/crdtp/error_support.h",
+ "$protocol_tool_path/crdtp/export.h",
+ "$protocol_tool_path/crdtp/find_by_first.h",
+ "$protocol_tool_path/crdtp/frontend_channel.h",
+ "$protocol_tool_path/crdtp/glue.h",
+ "$protocol_tool_path/crdtp/json.cc",
+ "$protocol_tool_path/crdtp/json.h",
+ "$protocol_tool_path/crdtp/parser_handler.h",
+ "$protocol_tool_path/crdtp/protocol_core.cc",
+ "$protocol_tool_path/crdtp/protocol_core.h",
+ "$protocol_tool_path/crdtp/serializable.cc",
+ "$protocol_tool_path/crdtp/serializable.h",
+ "$protocol_tool_path/crdtp/span.cc",
+ "$protocol_tool_path/crdtp/span.h",
+ "$protocol_tool_path/crdtp/status.cc",
+ "$protocol_tool_path/crdtp/status.h",
+ "$protocol_tool_path/crdtp/json_platform.cc",
+ "$protocol_tool_path/crdtp/json_platform.h",
+ ]
+ }
}
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 894fd515202cc3a1f933c2bbc618dd09869ad904..4f1ed661e9c432f3b50f2e7e348ad9794ff773d0 100644
index e85860de93dd5753dd4542ecee9f0888af93898a..04eab49c368c8f86837ed2c1384bf3c63e4bde24 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -781,6 +781,7 @@ void BuiltinLoader::RegisterExternalReferences(
@@ -783,6 +783,7 @@ void BuiltinLoader::RegisterExternalReferences(
registry->Register(GetNatives);
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
@@ -306,7 +246,7 @@ index 21992cbe894a880e3223c379326b62db22f2f12d..1296a5457422099035ba34f2b02624f2
} // namespace js2c
} // namespace node
diff --git a/tools/search_files.py b/tools/search_files.py
index 65d0e1be42f0a85418491ebb548278cf431aa6a0..d4a31342f1c6107b029394c6e1d00a1d1e877e03 100755
index 856878c33681a73d41016729dabe48b0a6a80589..91a11852d206b65485fe90fd037a0bd17a16c20b 100755
--- a/tools/search_files.py
+++ b/tools/search_files.py
@@ -14,6 +14,7 @@ if __name__ == '__main__':
@@ -314,14 +254,19 @@ index 65d0e1be42f0a85418491ebb548278cf431aa6a0..d4a31342f1c6107b029394c6e1d00a1d
files = SearchFiles(*sys.argv[2:])
files = [ os.path.relpath(x, sys.argv[1]) for x in files ]
+ files = [os.path.normpath(x).replace(os.sep, '/') for x in files]
print('\n'.join(files))
except Exception as e:
print(str(e))
# Apply the same transform in SearchFiles after relpath
if sys.platform == 'win32':
files = [ x.replace('\\', '/') for x in files ]
diff --git a/unofficial.gni b/unofficial.gni
index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5aeab1340d 100644
index 44641b92678ab2f28e6f5de75a92878f9f3d322d..672e97436d9220e8d5046b0c92025f50ae50a3d8 100644
--- a/unofficial.gni
+++ b/unofficial.gni
@@ -145,6 +145,7 @@ template("node_gn_build") {
@@ -142,32 +142,39 @@ template("node_gn_build") {
public_configs = [
":node_external_config",
"deps/googletest:googletest_config",
+ ":zstd_include_config"
]
public_deps = [
"deps/ada",
"deps/uv",
@@ -329,7 +274,11 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
"deps/simdjson",
"$node_v8_path",
]
@@ -156,7 +157,6 @@ template("node_gn_build") {
deps = [
":run_node_js2c",
- "deps/brotli",
"deps/cares",
"deps/histogram",
"deps/llhttp",
"deps/nbytes",
"deps/nghttp2",
@@ -337,7 +286,13 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
"deps/postject",
"deps/sqlite",
"deps/uvwasi",
@@ -165,7 +165,11 @@ template("node_gn_build") {
- "deps/zstd",
"//third_party/zlib",
+ "//third_party/brotli:dec",
+ "//third_party/brotli:enc",
+ "//third_party/zstd:decompress",
+ "//third_party/zstd:headers",
"$node_simdutf_path",
"$node_v8_path:v8_libplatform",
]
@@ -349,7 +304,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
"$target_gen_dir/node_javascript.cc",
] + gypi_values.node_sources
@@ -185,11 +189,12 @@ template("node_gn_build") {
@@ -190,7 +197,7 @@ template("node_gn_build") {
}
if (node_use_openssl) {
deps += [ "deps/ncrypto" ]
@@ -358,12 +313,18 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
sources += gypi_values.node_crypto_sources
}
if (node_enable_inspector) {
deps += [
+ "src/inspector:crdtp",
"src/inspector:node_protocol_generated_sources",
"src/inspector:v8_inspector_compress_protocol_json",
]
@@ -282,6 +287,7 @@ template("node_gn_build") {
@@ -214,6 +221,10 @@ template("node_gn_build") {
}
}
+ config("zstd_include_config") {
+ include_dirs = [ "//third_party/zstd/src/lib" ]
+ }
+
executable(target_name) {
forward_variables_from(invoker, "*")
@@ -288,6 +299,7 @@ template("node_gn_build") {
}
executable("node_js2c") {
@@ -371,7 +332,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
deps = [
"deps/uv",
"$node_simdutf_path",
@@ -292,26 +298,75 @@ template("node_gn_build") {
@@ -298,26 +310,75 @@ template("node_gn_build") {
"src/embedded_data.cc",
"src/embedded_data.h",
]
@@ -457,7 +418,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
outputs = [ "$target_gen_dir/node_javascript.cc" ]
# Get the path to node_js2c executable of the host toolchain.
@@ -325,11 +380,11 @@ template("node_gn_build") {
@@ -331,11 +392,11 @@ template("node_gn_build") {
get_label_info(":node_js2c($host_toolchain)", "name") +
host_executable_suffix

View File

@@ -14,10 +14,10 @@ We don't need to do this for zlib, as the existing gn workflow uses the same
Upstreamed at https://github.com/nodejs/node/pull/55903
diff --git a/unofficial.gni b/unofficial.gni
index 08603eaef2da51fd92f9bf977647b56409eff48c..cd0eae52ca9bf244e43643a2034fa9d26c4db206 100644
index 672e97436d9220e8d5046b0c92025f50ae50a3d8..a8ce18acfe333350f91b3e5f235db5f756b2e34a 100644
--- a/unofficial.gni
+++ b/unofficial.gni
@@ -153,7 +153,6 @@ template("node_gn_build") {
@@ -155,7 +155,6 @@ template("node_gn_build") {
":run_node_js2c",
"deps/cares",
"deps/histogram",
@@ -25,7 +25,7 @@ index 08603eaef2da51fd92f9bf977647b56409eff48c..cd0eae52ca9bf244e43643a2034fa9d2
"deps/nbytes",
"deps/nghttp2",
"deps/postject",
@@ -184,7 +183,17 @@ template("node_gn_build") {
@@ -191,7 +190,17 @@ template("node_gn_build") {
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
configs += [ "//build/config/gcc:symbol_visibility_default" ]
}
@@ -44,7 +44,7 @@ index 08603eaef2da51fd92f9bf977647b56409eff48c..cd0eae52ca9bf244e43643a2034fa9d2
if (v8_enable_i18n_support) {
deps += [ "//third_party/icu" ]
}
@@ -212,6 +221,19 @@ template("node_gn_build") {
@@ -219,6 +228,19 @@ template("node_gn_build") {
sources += node_inspector.node_inspector_sources +
node_inspector.node_inspector_generated_sources
}
@@ -63,4 +63,4 @@ index 08603eaef2da51fd92f9bf977647b56409eff48c..cd0eae52ca9bf244e43643a2034fa9d2
+ }
}
executable(target_name) {
config("zstd_include_config") {

View File

@@ -14,7 +14,7 @@ error: duplicate symbol: crdtp::ProtocolTypeTraits<std::__Cr::basic_string<char,
Some distinguishing change should be upstreamed to Node.js.
diff --git a/src/inspector/node_string.cc b/src/inspector/node_string.cc
index d83c53c81ca7745a31b200d5af3656af59f4f530..b2f6d412415e2988ead3c1e25b9557e1f0c91de3 100644
index 6db4bee1072bfe911a4179c3edb2bbaf18f1a182..c603f95f1f93438bd55bce3ff7f5bb314eb33666 100644
--- a/src/inspector/node_string.cc
+++ b/src/inspector/node_string.cc
@@ -7,7 +7,8 @@
@@ -44,7 +44,7 @@ index d83c53c81ca7745a31b200d5af3656af59f4f530..b2f6d412415e2988ead3c1e25b9557e1
namespace inspector {
namespace protocol {
diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h
index d529d1337be0e2292202920446e841701d16b0b7..08e00f9b94918e3385aed18de80eec5c7ad81095 100644
index 38cf96e874dcc49cde87137b2737c35a84f418d0..b2f67c224acc7b3a3b867867e251a7c62833f46e 100644
--- a/src/inspector/node_string.h
+++ b/src/inspector/node_string.h
@@ -15,8 +15,8 @@ namespace crdtp {

View File

@@ -10,10 +10,10 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.
diff --git a/common.gypi b/common.gypi
index 755bd203173a69564be203ad58c33eb50680b204..a7a0ffde7209de51ffcbf0db0ed7efcf09ad606d 100644
index 53016fc79c3d914982abeb61bf0a76181024e2bf..99b147482b636706b1372b89298f35b60ca2bb31 100644
--- a/common.gypi
+++ b/common.gypi
@@ -518,7 +518,7 @@
@@ -530,7 +530,7 @@
'-fno-rtti',
'-fno-exceptions',
'-fno-strict-aliasing',
@@ -22,7 +22,7 @@ index 755bd203173a69564be203ad58c33eb50680b204..a7a0ffde7209de51ffcbf0db0ed7efcf
],
'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ],
@@ -688,7 +688,7 @@
@@ -700,7 +700,7 @@
['clang==1', {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',

View File

@@ -64,10 +64,10 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327
module.exports = {
diff --git a/node.gyp b/node.gyp
index d97004c8e148be6b63634dad5306756d503fb1f8..271fb4f76bc1e69baad0b1fafca128b3bca4a360 100644
index ec1f90b73f7d119b2c0e0207a5e36f3cec7295e9..66244b6638e34536aed397f56c6a4570a73e9b90 100644
--- a/node.gyp
+++ b/node.gyp
@@ -174,7 +174,6 @@
@@ -175,7 +175,6 @@
'src/timers.cc',
'src/timer_wrap.cc',
'src/tracing/agent.cc',
@@ -75,7 +75,7 @@ index d97004c8e148be6b63634dad5306756d503fb1f8..271fb4f76bc1e69baad0b1fafca128b3
'src/tracing/node_trace_writer.cc',
'src/tracing/trace_event.cc',
'src/tracing/traced_value.cc',
@@ -302,7 +301,6 @@
@@ -303,7 +302,6 @@
'src/tcp_wrap.h',
'src/timers.h',
'src/tracing/agent.h',

View File

@@ -7,10 +7,10 @@ Subject: build: ensure native module compilation fails if not using a new
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
diff --git a/common.gypi b/common.gypi
index 5d74876ab28f8c10bb9543f7652478514414d8d2..755bd203173a69564be203ad58c33eb50680b204 100644
index f2a45f0f0bbfce93e61d3696a18425af4d022a00..53016fc79c3d914982abeb61bf0a76181024e2bf 100644
--- a/common.gypi
+++ b/common.gypi
@@ -86,6 +86,8 @@
@@ -88,6 +88,8 @@
'v8_use_perfetto': 0,
'tsan%': 0,
@@ -19,7 +19,7 @@ index 5d74876ab28f8c10bb9543f7652478514414d8d2..755bd203173a69564be203ad58c33eb5
##### end V8 defaults #####
# When building native modules using 'npm install' with the system npm,
@@ -291,6 +293,7 @@
@@ -293,6 +295,7 @@
# Defines these mostly for node-gyp to pickup.
'defines': [
'_GLIBCXX_USE_CXX11_ABI=1',
@@ -27,7 +27,7 @@ index 5d74876ab28f8c10bb9543f7652478514414d8d2..755bd203173a69564be203ad58c33eb5
],
# Forcibly disable -Werror. We support a wide range of compilers, it's
@@ -437,6 +440,11 @@
@@ -449,6 +452,11 @@
}],
],
}],
@@ -40,10 +40,10 @@ index 5d74876ab28f8c10bb9543f7652478514414d8d2..755bd203173a69564be203ad58c33eb5
# list in v8/BUILD.gn.
['v8_enable_v8_checks == 1', {
diff --git a/configure.py b/configure.py
index 712ed40f77e54d52d5b3c52bb68e2b7d48879812..6bcb7450975636b5dbc689470663ee37903874d5 100755
index 95faeeef3867cbf3ca4b1857d893aa127d550a2f..b36f63a5482074f79a20709b8c4774cb6dadec52 100755
--- a/configure.py
+++ b/configure.py
@@ -1644,6 +1644,7 @@ def configure_library(lib, output, pkgname=None):
@@ -1698,6 +1698,7 @@ def configure_library(lib, output, pkgname=None):
def configure_v8(o, configs):
set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0)
@@ -52,7 +52,7 @@ index 712ed40f77e54d52d5b3c52bb68e2b7d48879812..6bcb7450975636b5dbc689470663ee37
o['variables']['v8_enable_javascript_promise_hooks'] = 1
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
diff --git a/src/node.h b/src/node.h
index 7726d3de1e82689655e8fceb4135eec303498572..120e3a1042e29590cbbf4be258a1cd2d3d4f0043 100644
index 8b77f7cb4d53105f42ba76d99a76a98b7a73789f..bdc77f8eb7abffa9e6c98cd254daedad3e44b981 100644
--- a/src/node.h
+++ b/src/node.h
@@ -22,6 +22,12 @@

View File

@@ -34,7 +34,7 @@ index 411eab8136d5957ae8a491bc38ffbdc88e59f5da..63c93b5be09692d0d4b6bfbb214b173b
let kResistStopPropagation;
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 4f1ed661e9c432f3b50f2e7e348ad9794ff773d0..16c95348ee254061d5c48f405968c1b0ee33bf82 100644
index 04eab49c368c8f86837ed2c1384bf3c63e4bde24..c3d2b3c90c206dd81a3d8aa6c14fdf4678a1cddd 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -34,6 +34,7 @@ using v8::Value;

View File

@@ -39,10 +39,10 @@ index d8aacbdf1a8fc858c792ad3ce17ca2f46baebe7e..4625008c048532c2c3340130670647d2
void HandleDouble(double value) override {
diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h
index 08e00f9b94918e3385aed18de80eec5c7ad81095..23e678da55c373400d86e67caec436800531d40d 100644
index b2f67c224acc7b3a3b867867e251a7c62833f46e..33e93ce5bf7dda7e30b7b1b198ff3b53ccfac22a 100644
--- a/src/inspector/node_string.h
+++ b/src/inspector/node_string.h
@@ -63,7 +63,7 @@ class Binary {
@@ -66,7 +66,7 @@ class Binary {
static Binary fromBase64(const std::string_view base64, bool* success) {
UNREACHABLE();
}
@@ -65,10 +65,10 @@ index 3d7aa148678b2646b88fa7c32abec91791b02b82..4810d93eb971b253f7dadff7011a632f
gypi_values = exec_script(
"../../tools/gypi_to_gn.py",
diff --git a/unofficial.gni b/unofficial.gni
index cd0eae52ca9bf244e43643a2034fa9d26c4db206..d61a9bd5f4f0c92682f10b449976735859ecbc55 100644
index a8ce18acfe333350f91b3e5f235db5f756b2e34a..6bcc40b282543fc40f80c5c6659de658209844b8 100644
--- a/unofficial.gni
+++ b/unofficial.gni
@@ -204,13 +204,14 @@ template("node_gn_build") {
@@ -211,13 +211,14 @@ template("node_gn_build") {
}
if (node_enable_inspector) {
deps += [

View File

@@ -1,59 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Mon, 3 Feb 2025 21:44:36 +0900
Subject: build: remove explicit linker call to libm on macOS
/usr/lib/libm.tbd is available via libSystem.*.dylib and
reexports sanitizer symbols. When building for asan
this becomes an issue as the linker will resolve the symbols
from the system library rather from libclang_rt.*
For V8 that rely on specific version of these symbols
that get bundled as part of clang, for ex:
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/cppgc/platform.cc;l=93-97
accepting nullptr for shadow_offset in `asan_get_shadow_mapping`,
linking to system version that doesn't support this will lead to
a crash.
Clang driver eventually links with `-lSystem`
https://github.com/llvm/llvm-project/blob/e82f93890daefeb38fe2a22ee3db87a89948ec57/clang/lib/Driver/ToolChains/Darwin.cpp#L1628-L1631,
this is done after linking the sanitizer libraries which
ensures right order of resolution for the symbols.
PR-URL: https://github.com/nodejs/node/pull/56901
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni
index 5e07e106672a04508a77584c109c97a67926c858..91001fa43ea4807d061f296eaeccb7512e34863e 100644
--- a/deps/brotli/unofficial.gni
+++ b/deps/brotli/unofficial.gni
@@ -25,7 +25,7 @@ template("brotli_gn_build") {
} else if (target_os == "freebsd") {
defines = [ "OS_FREEBSD" ]
}
- if (!is_win) {
+ if (is_linux) {
libs = [ "m" ]
}
if (is_clang || !is_win) {
diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni
index 348d2f0703e47ca7c5326a4b4c1d6ae31157eeb5..0944d6ddd241b113970ab6aa5804f9534fde882a 100644
--- a/deps/uv/unofficial.gni
+++ b/deps/uv/unofficial.gni
@@ -87,11 +87,11 @@ template("uv_gn_build") {
]
}
if (is_posix) {
- libs = [ "m" ]
ldflags = [ "-pthread" ]
}
if (is_linux) {
- libs += [
+ libs = [
+ "m",
"dl",
"rt",
]

View File

@@ -11,10 +11,10 @@ node-gyp will use the result of `process.config` that reflects the environment
in which the binary got built.
diff --git a/common.gypi b/common.gypi
index a7a0ffde7209de51ffcbf0db0ed7efcf09ad606d..20fd68eeb878b51f361d72070d87338db3d9a8d4 100644
index 99b147482b636706b1372b89298f35b60ca2bb31..5024e5fb0aee210f4986572638a523db6d26b4cc 100644
--- a/common.gypi
+++ b/common.gypi
@@ -125,6 +125,7 @@
@@ -127,6 +127,7 @@
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a',
}],
['OS=="mac"', {

View File

@@ -11,10 +11,10 @@ Without this patch, building with simdjson fails with
This patch can be removed once this is fixed upstream in simdjson.
diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h
index f21cd9381eef59ec43502c796fcaddb1b96525f5..e691fd24aa24d225f8c00fa5638be07265bfeeab 100644
index c1535ee81300b9cb93eb9ee6e769246793f936c3..3350287401e181e1d4ee432b8bd16081d0d7a73e 100644
--- a/deps/simdjson/simdjson.h
+++ b/deps/simdjson/simdjson.h
@@ -3654,12 +3654,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
@@ -3837,12 +3837,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
} // namespace simdjson
@@ -22,9 +22,9 @@ index f21cd9381eef59ec43502c796fcaddb1b96525f5..e691fd24aa24d225f8c00fa5638be072
+#pragma clang diagnostic ignored "-Wdeprecated-literal-operator"
+
// This is deliberately outside of simdjson so that people get it without having to use the namespace
inline simdjson::padded_string operator "" _padded(const char *str, size_t len);
inline simdjson::padded_string operator ""_padded(const char *str, size_t len);
#ifdef __cpp_char8_t
inline simdjson::padded_string operator "" _padded(const char8_t *str, size_t len);
inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len);
#endif
+#pragma clang diagnostic pop
@@ -32,17 +32,17 @@ index f21cd9381eef59ec43502c796fcaddb1b96525f5..e691fd24aa24d225f8c00fa5638be072
namespace simdjson {
namespace internal {
@@ -4037,6 +4042,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
@@ -4242,6 +4247,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
} // namespace simdjson
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-literal-operator"
+
inline simdjson::padded_string operator "" _padded(const char *str, size_t len) {
inline simdjson::padded_string operator ""_padded(const char *str, size_t len) {
return simdjson::padded_string(str, len);
}
@@ -4045,6 +4053,8 @@ inline simdjson::padded_string operator "" _padded(const char8_t *str, size_t le
@@ -4250,6 +4258,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len
return simdjson::padded_string(reinterpret_cast<const char8_t *>(str), len);
}
#endif
@@ -51,10 +51,3 @@ index f21cd9381eef59ec43502c796fcaddb1b96525f5..e691fd24aa24d225f8c00fa5638be072
#endif // SIMDJSON_PADDED_STRING_INL_H
/* end file simdjson/padded_string-inl.h */
/* skipped duplicate #include "simdjson/padded_string_view.h" */
@@ -118292,4 +118302,4 @@ namespace simdjson {
/* end file simdjson/ondemand.h */
#endif // SIMDJSON_H
-/* end file simdjson.h */
+/* end file simdjson.h */
\ No newline at end of file

View File

@@ -11,7 +11,7 @@ its own blended handler between Node and Blink.
Not upstreamable.
diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js
index 99061e62976e7cb24be81e8632b0e21d1e9adf9a..bbc9311c059e8ab0328c5f92b21a6be57620717e 100644
index fd17ce8695c55f8f38ed19d59960acc1a7692bc8..96754db3277b3a0445b69275368602166c6d5423 100644
--- a/lib/internal/modules/esm/utils.js
+++ b/lib/internal/modules/esm/utils.js
@@ -30,7 +30,7 @@ const {
@@ -23,7 +23,7 @@ index 99061e62976e7cb24be81e8632b0e21d1e9adf9a..bbc9311c059e8ab0328c5f92b21a6be5
const {
loadPreloadModules,
initializeFrozenIntrinsics,
@@ -274,12 +274,13 @@ let _forceDefaultLoader = false;
@@ -280,12 +280,13 @@ let _forceDefaultLoader = false;
* @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders.
*/
function initializeESM(forceDefaultLoader = false) {
@@ -40,10 +40,10 @@ index 99061e62976e7cb24be81e8632b0e21d1e9adf9a..bbc9311c059e8ab0328c5f92b21a6be5
/**
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index 649ec428e2dd6fbf0082b3f1ba9fdfbfab892a94..168912fe6ede3b71ab3029c292ba430915fd79d8 100644
index 912acc8da815405531d8b527383f19c3731be100..8d48f4693c3b5f0d1d94d3edadc48c4f36d1bf97 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -832,7 +832,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
@@ -858,7 +858,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
return module->module_.Get(isolate);
}
@@ -52,7 +52,7 @@ index 649ec428e2dd6fbf0082b3f1ba9fdfbfab892a94..168912fe6ede3b71ab3029c292ba4309
Local<Context> context,
Local<Data> host_defined_options,
Local<Value> resource_name,
@@ -897,12 +897,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
@@ -923,12 +923,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
Realm* realm = Realm::GetCurrent(args);
HandleScope handle_scope(isolate);
@@ -68,7 +68,7 @@ index 649ec428e2dd6fbf0082b3f1ba9fdfbfab892a94..168912fe6ede3b71ab3029c292ba4309
}
void ModuleWrap::HostInitializeImportMetaObjectCallback(
@@ -944,13 +945,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
@@ -970,13 +971,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
Realm* realm = Realm::GetCurrent(args);
Isolate* isolate = realm->isolate();

View File

@@ -15,747 +15,17 @@ Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
diff --git a/doc/api/cli.md b/doc/api/cli.md
index 431a6aa7a2cf4d537cb719f15c2749254e0433b3..1d1672a01c4fae6b339cb144d0d6e35b49209a14 100644
index 114b7bbf6b1e105fc1696ed8a064065db73ff519..ad863e52761332c3249a86af0e3d239cd0f73b03 100644
--- a/doc/api/cli.md
+++ b/doc/api/cli.md
@@ -32,11 +32,11 @@ is passed. If no corresponding file is found, an error is thrown.
If a file is found, its path will be passed to the
[ES module loader][Modules loaders] under any of the following conditions:
-* The program was started with a command-line flag that forces the entry
+- The program was started with a command-line flag that forces the entry
point to be loaded with ECMAScript module loader, such as `--import` or
[`--experimental-default-type=module`][].
-* The file has an `.mjs` extension.
-* The file does not have a `.cjs` extension, and the nearest parent
+- The file has an `.mjs` extension.
+- The file does not have a `.cjs` extension, and the nearest parent
`package.json` file contains a top-level [`"type"`][] field with a value of
`"module"`.
@@ -164,7 +164,10 @@ Example:
```js
const childProcess = require('node:child_process');
// Attempt to bypass the permission
-childProcess.spawn('node', ['-e', 'require("fs").writeFileSync("/new-file", "example")']);
+childProcess.spawn('node', [
+ '-e',
+ 'require("fs").writeFileSync("/new-file", "example")',
+]);
```
```console
@@ -206,8 +209,8 @@ the [Permission Model][].
The valid arguments for the `--allow-fs-read` flag are:
-* `*` - To allow all `FileSystemRead` operations.
-* Multiple paths can be allowed using multiple `--allow-fs-read` flags.
+- `*` - To allow all `FileSystemRead` operations.
+- Multiple paths can be allowed using multiple `--allow-fs-read` flags.
Example `--allow-fs-read=/folder1/ --allow-fs-read=/folder1/`
Examples can be found in the [File System Permissions][] documentation.
@@ -251,8 +254,8 @@ the [Permission Model][].
The valid arguments for the `--allow-fs-write` flag are:
-* `*` - To allow all `FileSystemWrite` operations.
-* Multiple paths can be allowed using multiple `--allow-fs-write` flags.
+- `*` - To allow all `FileSystemWrite` operations.
+- Multiple paths can be allowed using multiple `--allow-fs-write` flags.
Example `--allow-fs-write=/folder1/ --allow-fs-write=/folder1/`
Paths delimited by comma (`,`) are no longer allowed.
@@ -399,10 +402,10 @@ creation behavior.
The following options are currently supported:
-* `builder` {string} Required. Provides the name to the script that is executed
+- `builder` {string} Required. Provides the name to the script that is executed
before building the snapshot, as if [`--build-snapshot`][] had been passed
with `builder` as the main script name.
-* `withoutCodeCache` {boolean} Optional. Including the code cache reduces the
+- `withoutCodeCache` {boolean} Optional. Including the code cache reduces the
time spent on compiling functions included in the snapshot at the expense
of a bigger snapshot size and potentially breaking portability of the
snapshot.
@@ -550,9 +553,9 @@ Defaults to current working directory.
Affects the default output directory of:
-* [`--cpu-prof-dir`][]
-* [`--heap-prof-dir`][]
-* [`--redirect-warnings`][]
+- [`--cpu-prof-dir`][]
+- [`--heap-prof-dir`][]
+- [`--redirect-warnings`][]
### `--disable-proto=mode`
@@ -697,9 +700,9 @@ changes:
Set the default value of `order` in [`dns.lookup()`][] and
[`dnsPromises.lookup()`][]. The value could be:
-* `ipv4first`: sets default `order` to `ipv4first`.
-* `ipv6first`: sets default `order` to `ipv6first`.
-* `verbatim`: sets default `order` to `verbatim`.
+- `ipv4first`: sets default `order` to `ipv4first`.
+- `ipv6first`: sets default `order` to `ipv6first`.
+- `verbatim`: sets default `order` to `verbatim`.
The default is `verbatim` and [`dns.setDefaultResultOrder()`][] have higher
priority than `--dns-result-order`.
@@ -890,7 +893,7 @@ added: v22.7.0
> Stability: 1 - Experimental
Enables the use of [`AsyncLocalStorage`][] backed by `AsyncContextFrame` rather
-than the default implementation which relies on async\_hooks. This new model is
+than the default implementation which relies on async_hooks. This new model is
implemented very differently and so could have differences in how context data
flows within the application. As such, it is presently recommended to be sure
your application behaviour is unaffected by this change before using it in
@@ -909,12 +912,12 @@ added:
Define which module system, `module` or `commonjs`, to use for the following:
-* String input provided via `--eval` or STDIN, if `--input-type` is unspecified.
+- String input provided via `--eval` or STDIN, if `--input-type` is unspecified.
-* Files ending in `.js` or with no extension, if there is no `package.json` file
+- Files ending in `.js` or with no extension, if there is no `package.json` file
present in the same folder or any parent folder.
-* Files ending in `.js` or with no extension, if the nearest parent
+- Files ending in `.js` or with no extension, if the nearest parent
`package.json` field lacks a `"type"` field; unless the `package.json` folder
or any parent folder is inside a `node_modules` folder.
@@ -1450,15 +1453,15 @@ interoperability with non-conformant HTTP implementations.
When enabled, the parser will accept the following:
-* Invalid HTTP headers values.
-* Invalid HTTP versions.
-* Allow message containing both `Transfer-Encoding`
+- Invalid HTTP headers values.
+- Invalid HTTP versions.
+- Allow message containing both `Transfer-Encoding`
and `Content-Length` headers.
-* Allow extra data after message when `Connection: close` is present.
-* Allow extra transfer encodings after `chunked` has been provided.
-* Allow `\n` to be used as token separator instead of `\r\n`.
-* Allow `\r\n` not to be provided after a chunk.
-* Allow spaces to be present after a chunk size and before `\r\n`.
+- Allow extra data after message when `Connection: close` is present.
+- Allow extra transfer encodings after `chunked` has been provided.
+- Allow `\n` to be used as token separator instead of `\r\n`.
+- Allow `\r\n` not to be provided after a chunk.
+- Allow spaces to be present after a chunk size and before `\r\n`.
All the above will expose your application to request smuggling
or poisoning attack. Avoid using this option.
@@ -1536,8 +1539,8 @@ a [remote code execution][] attack.
If specifying a host, make sure that either:
-* The host is not accessible from public networks.
-* A firewall disallows unwanted connections on the port.
+- The host is not accessible from public networks.
+- A firewall disallows unwanted connections on the port.
**More specifically, `--inspect=0.0.0.0` is insecure if the port (`9229` by
default) is not firewall-protected.**
@@ -1799,7 +1802,7 @@ added:
-->
Enable OpenSSL 3.0 legacy provider. For more information please see
-[OSSL\_PROVIDER-legacy][OSSL_PROVIDER-legacy].
+[OSSL_PROVIDER-legacy][OSSL_PROVIDER-legacy].
### `--openssl-shared-config`
@@ -1849,12 +1852,12 @@ changes:
Enable the Permission Model for current process. When enabled, the
following permissions are restricted:
-* File System - manageable through
+- File System - manageable through
[`--allow-fs-read`][], [`--allow-fs-write`][] flags
-* Child Process - manageable through [`--allow-child-process`][] flag
-* Worker Threads - manageable through [`--allow-worker`][] flag
-* WASI - manageable through [`--allow-wasi`][] flag
-* Addons - manageable through [`--allow-addons`][] flag
+- Child Process - manageable through [`--allow-child-process`][] flag
+- Worker Threads - manageable through [`--allow-worker`][] flag
+- WASI - manageable through [`--allow-wasi`][] flag
+- Addons - manageable through [`--allow-addons`][] flag
### `--preserve-symlinks`
@@ -2194,16 +2197,16 @@ cases.
Some features of other `run` implementations that are intentionally excluded
are:
-* Running `pre` or `post` scripts in addition to the specified script.
-* Defining package manager-specific environment variables.
+- Running `pre` or `post` scripts in addition to the specified script.
+- Defining package manager-specific environment variables.
#### Environment variables
The following environment variables are set when running a script with `--run`:
-* `NODE_RUN_SCRIPT_NAME`: The name of the script being run. For example, if
+- `NODE_RUN_SCRIPT_NAME`: The name of the script being run. For example, if
`--run` is used to run `test`, the value of this variable will be `test`.
-* `NODE_RUN_PACKAGE_JSON_PATH`: The path to the `package.json` that is being
+- `NODE_RUN_PACKAGE_JSON_PATH`: The path to the `package.json` that is being
processed.
### `--secure-heap-min=n`
@@ -2601,39 +2604,6 @@ added: v12.0.0
Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.3'. Use to disable support
for TLSv1.2, which is not as secure as TLSv1.3.
-### `--trace-atomics-wait`
-
-<!-- YAML
-added: v14.3.0
-deprecated:
- - v18.8.0
- - v16.18.0
--->
-
-> Stability: 0 - Deprecated
-
-Print short summaries of calls to [`Atomics.wait()`][] to stderr.
-The output could look like this:
-
-```text
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) started
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) did not wait because the values mismatched
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) started
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) timed out
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) started
-(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) started
-(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) was woken up by another thread
-(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) was woken up by another thread
-```
-
-The fields here correspond to:
-
-* The thread id as given by [`worker_threads.threadId`][]
-* The base address of the `SharedArrayBuffer` in question, as well as the
- byte offset corresponding to the index passed to `Atomics.wait()`
-* The expected value that was passed to `Atomics.wait()`
-* The timeout passed to `Atomics.wait`
-
### `--trace-deprecation`
<!-- YAML
@@ -2651,14 +2621,14 @@ added: v22.13.0
Print information about any access to environment variables done in the current Node.js
instance to stderr, including:
-* The environment variable reads that Node.js does internally.
-* Writes in the form of `process.env.KEY = "SOME VALUE"`.
-* Reads in the form of `process.env.KEY`.
-* Definitions in the form of `Object.defineProperty(process.env, 'KEY', {...})`.
-* Queries in the form of `Object.hasOwn(process.env, 'KEY')`,
+- The environment variable reads that Node.js does internally.
+- Writes in the form of `process.env.KEY = "SOME VALUE"`.
+- Reads in the form of `process.env.KEY`.
+- Definitions in the form of `Object.defineProperty(process.env, 'KEY', {...})`.
+- Queries in the form of `Object.hasOwn(process.env, 'KEY')`,
`process.env.hasOwnProperty('KEY')` or `'KEY' in process.env`.
-* Deletions in the form of `delete process.env.KEY`.
-* Enumerations inf the form of `...process.env` or `Object.keys(process.env)`.
+- Deletions in the form of `delete process.env.KEY`.
+- Enumerations inf the form of `...process.env` or `Object.keys(process.env)`.
Only the names of the environment variables being accessed are printed. The values are not printed.
@@ -2803,15 +2773,15 @@ changes:
Using this flag allows to change what should happen when an unhandled rejection
occurs. One of the following modes can be chosen:
-* `throw`: Emit [`unhandledRejection`][]. If this hook is not set, raise the
+- `throw`: Emit [`unhandledRejection`][]. If this hook is not set, raise the
unhandled rejection as an uncaught exception. This is the default.
-* `strict`: Raise the unhandled rejection as an uncaught exception. If the
+- `strict`: Raise the unhandled rejection as an uncaught exception. If the
exception is handled, [`unhandledRejection`][] is emitted.
-* `warn`: Always trigger a warning, no matter if the [`unhandledRejection`][]
+- `warn`: Always trigger a warning, no matter if the [`unhandledRejection`][]
hook is set or not but do not print the deprecation warning.
-* `warn-with-error-code`: Emit [`unhandledRejection`][]. If this hook is not
+- `warn-with-error-code`: Emit [`unhandledRejection`][]. If this hook is not
set, trigger a warning, and set the process exit code to 1.
-* `none`: Silence all warnings.
+- `none`: Silence all warnings.
If a rejection happens during the command line entry point's ES module static
loading phase, it will always raise it as an uncaught exception.
@@ -2851,10 +2821,10 @@ MiB pages instead of 4 KiB pages.
The following values are valid for `mode`:
-* `off`: No mapping will be attempted. This is the default.
-* `on`: If supported by the OS, mapping will be attempted. Failure to map will
+- `off`: No mapping will be attempted. This is the default.
+- `on`: If supported by the OS, mapping will be attempted. Failure to map will
be ignored and a message will be printed to standard error.
-* `silent`: If supported by the OS, mapping will be attempted. Failure to map
+- `silent`: If supported by the OS, mapping will be attempted. Failure to map
will be ignored and will not be reported.
### `--v8-options`
@@ -2982,9 +2952,9 @@ instances.
The `FORCE_COLOR` environment variable is used to
enable ANSI colorized output. The value may be:
-* `1`, `true`, or the empty string `''` indicate 16-color support,
-* `2` to indicate 256-color support, or
-* `3` to indicate 16 million-color support.
+- `1`, `true`, or the empty string `''` indicate 16-color support,
+- `2` to indicate 256-color support, or
+- `3` to indicate 16 million-color support.
When `FORCE_COLOR` is used and set to a supported value, both the `NO_COLOR`,
and `NODE_DISABLE_COLORS` environment variables are ignored.
@@ -3114,151 +3084,150 @@ one is included in the list below.
<!-- node-options-node start -->
-* `--allow-addons`
-* `--allow-child-process`
-* `--allow-fs-read`
-* `--allow-fs-write`
-* `--allow-wasi`
-* `--allow-worker`
-* `--conditions`, `-C`
-* `--diagnostic-dir`
-* `--disable-proto`
-* `--disable-sigusr1`
-* `--disable-warning`
-* `--disable-wasm-trap-handler`
-* `--dns-result-order`
-* `--enable-fips`
-* `--enable-network-family-autoselection`
-* `--enable-source-maps`
-* `--entry-url`
-* `--experimental-abortcontroller`
-* `--experimental-async-context-frame`
-* `--experimental-default-type`
-* `--experimental-detect-module`
-* `--experimental-eventsource`
-* `--experimental-import-meta-resolve`
-* `--experimental-json-modules`
-* `--experimental-loader`
-* `--experimental-modules`
-* `--experimental-permission`
-* `--experimental-print-required-tla`
-* `--experimental-require-module`
-* `--experimental-shadow-realm`
-* `--experimental-specifier-resolution`
-* `--experimental-strip-types`
-* `--experimental-top-level-await`
-* `--experimental-transform-types`
-* `--experimental-vm-modules`
-* `--experimental-wasi-unstable-preview1`
-* `--experimental-wasm-modules`
-* `--experimental-webstorage`
-* `--force-context-aware`
-* `--force-fips`
-* `--force-node-api-uncaught-exceptions-policy`
-* `--frozen-intrinsics`
-* `--heap-prof-dir`
-* `--heap-prof-interval`
-* `--heap-prof-name`
-* `--heap-prof`
-* `--heapsnapshot-near-heap-limit`
-* `--heapsnapshot-signal`
-* `--http-parser`
-* `--icu-data-dir`
-* `--import`
-* `--input-type`
-* `--insecure-http-parser`
-* `--inspect-brk`
-* `--inspect-port`, `--debug-port`
-* `--inspect-publish-uid`
-* `--inspect-wait`
-* `--inspect`
-* `--localstorage-file`
-* `--max-http-header-size`
-* `--napi-modules`
-* `--network-family-autoselection-attempt-timeout`
-* `--no-addons`
-* `--no-deprecation`
-* `--no-experimental-fetch`
-* `--no-experimental-global-customevent`
-* `--no-experimental-global-navigator`
-* `--no-experimental-global-webcrypto`
-* `--no-experimental-repl-await`
-* `--no-experimental-sqlite`
-* `--no-experimental-websocket`
-* `--no-extra-info-on-fatal-exception`
-* `--no-force-async-hooks-checks`
-* `--no-global-search-paths`
-* `--no-network-family-autoselection`
-* `--no-warnings`
-* `--node-memory-debug`
-* `--openssl-config`
-* `--openssl-legacy-provider`
-* `--openssl-shared-config`
-* `--pending-deprecation`
-* `--permission`
-* `--preserve-symlinks-main`
-* `--preserve-symlinks`
-* `--prof-process`
-* `--redirect-warnings`
-* `--report-compact`
-* `--report-dir`, `--report-directory`
-* `--report-exclude-env`
-* `--report-exclude-network`
-* `--report-filename`
-* `--report-on-fatalerror`
-* `--report-on-signal`
-* `--report-signal`
-* `--report-uncaught-exception`
-* `--require`, `-r`
-* `--secure-heap-min`
-* `--secure-heap`
-* `--snapshot-blob`
-* `--test-coverage-branches`
-* `--test-coverage-exclude`
-* `--test-coverage-functions`
-* `--test-coverage-include`
-* `--test-coverage-lines`
-* `--test-name-pattern`
-* `--test-only`
-* `--test-reporter-destination`
-* `--test-reporter`
-* `--test-shard`
-* `--test-skip-pattern`
-* `--throw-deprecation`
-* `--title`
-* `--tls-cipher-list`
-* `--tls-keylog`
-* `--tls-max-v1.2`
-* `--tls-max-v1.3`
-* `--tls-min-v1.0`
-* `--tls-min-v1.1`
-* `--tls-min-v1.2`
-* `--tls-min-v1.3`
@@ -3313,7 +3313,6 @@ one is included in the list below.
* `--tls-min-v1.1`
* `--tls-min-v1.2`
* `--tls-min-v1.3`
-* `--trace-atomics-wait`
-* `--trace-deprecation`
-* `--trace-env-js-stack`
-* `--trace-env-native-stack`
-* `--trace-env`
-* `--trace-event-categories`
-* `--trace-event-file-pattern`
-* `--trace-events-enabled`
-* `--trace-exit`
-* `--trace-require-module`
-* `--trace-sigint`
-* `--trace-sync-io`
-* `--trace-tls`
-* `--trace-uncaught`
-* `--trace-warnings`
-* `--track-heap-objects`
-* `--unhandled-rejections`
-* `--use-bundled-ca`
-* `--use-largepages`
-* `--use-openssl-ca`
-* `--v8-pool-size`
-* `--watch-path`
-* `--watch-preserve-output`
-* `--watch`
-* `--zero-fill-buffers`
+- `--allow-addons`
+- `--allow-child-process`
+- `--allow-fs-read`
+- `--allow-fs-write`
+- `--allow-wasi`
+- `--allow-worker`
+- `--conditions`, `-C`
+- `--diagnostic-dir`
+- `--disable-proto`
+- `--disable-sigusr1`
+- `--disable-warning`
+- `--disable-wasm-trap-handler`
+- `--dns-result-order`
+- `--enable-fips`
+- `--enable-network-family-autoselection`
+- `--enable-source-maps`
+- `--entry-url`
+- `--experimental-abortcontroller`
+- `--experimental-async-context-frame`
+- `--experimental-default-type`
+- `--experimental-detect-module`
+- `--experimental-eventsource`
+- `--experimental-import-meta-resolve`
+- `--experimental-json-modules`
+- `--experimental-loader`
+- `--experimental-modules`
+- `--experimental-permission`
+- `--experimental-print-required-tla`
+- `--experimental-require-module`
+- `--experimental-shadow-realm`
+- `--experimental-specifier-resolution`
+- `--experimental-strip-types`
+- `--experimental-top-level-await`
+- `--experimental-transform-types`
+- `--experimental-vm-modules`
+- `--experimental-wasi-unstable-preview1`
+- `--experimental-wasm-modules`
+- `--experimental-webstorage`
+- `--force-context-aware`
+- `--force-fips`
+- `--force-node-api-uncaught-exceptions-policy`
+- `--frozen-intrinsics`
+- `--heap-prof-dir`
+- `--heap-prof-interval`
+- `--heap-prof-name`
+- `--heap-prof`
+- `--heapsnapshot-near-heap-limit`
+- `--heapsnapshot-signal`
+- `--http-parser`
+- `--icu-data-dir`
+- `--import`
+- `--input-type`
+- `--insecure-http-parser`
+- `--inspect-brk`
+- `--inspect-port`, `--debug-port`
+- `--inspect-publish-uid`
+- `--inspect-wait`
+- `--inspect`
+- `--localstorage-file`
+- `--max-http-header-size`
+- `--napi-modules`
+- `--network-family-autoselection-attempt-timeout`
+- `--no-addons`
+- `--no-deprecation`
+- `--no-experimental-fetch`
+- `--no-experimental-global-customevent`
+- `--no-experimental-global-navigator`
+- `--no-experimental-global-webcrypto`
+- `--no-experimental-repl-await`
+- `--no-experimental-sqlite`
+- `--no-experimental-websocket`
+- `--no-extra-info-on-fatal-exception`
+- `--no-force-async-hooks-checks`
+- `--no-global-search-paths`
+- `--no-network-family-autoselection`
+- `--no-warnings`
+- `--node-memory-debug`
+- `--openssl-config`
+- `--openssl-legacy-provider`
+- `--openssl-shared-config`
+- `--pending-deprecation`
+- `--permission`
+- `--preserve-symlinks-main`
+- `--preserve-symlinks`
+- `--prof-process`
+- `--redirect-warnings`
+- `--report-compact`
+- `--report-dir`, `--report-directory`
+- `--report-exclude-env`
+- `--report-exclude-network`
+- `--report-filename`
+- `--report-on-fatalerror`
+- `--report-on-signal`
+- `--report-signal`
+- `--report-uncaught-exception`
+- `--require`, `-r`
+- `--secure-heap-min`
+- `--secure-heap`
+- `--snapshot-blob`
+- `--test-coverage-branches`
+- `--test-coverage-exclude`
+- `--test-coverage-functions`
+- `--test-coverage-include`
+- `--test-coverage-lines`
+- `--test-name-pattern`
+- `--test-only`
+- `--test-reporter-destination`
+- `--test-reporter`
+- `--test-shard`
+- `--test-skip-pattern`
+- `--throw-deprecation`
+- `--title`
+- `--tls-cipher-list`
+- `--tls-keylog`
+- `--tls-max-v1.2`
+- `--tls-max-v1.3`
+- `--tls-min-v1.0`
+- `--tls-min-v1.1`
+- `--tls-min-v1.2`
+- `--tls-min-v1.3`
+- `--trace-deprecation`
+- `--trace-env-js-stack`
+- `--trace-env-native-stack`
+- `--trace-env`
+- `--trace-event-categories`
+- `--trace-event-file-pattern`
+- `--trace-events-enabled`
+- `--trace-exit`
+- `--trace-require-module`
+- `--trace-sigint`
+- `--trace-sync-io`
+- `--trace-tls`
+- `--trace-uncaught`
+- `--trace-warnings`
+- `--track-heap-objects`
+- `--unhandled-rejections`
+- `--use-bundled-ca`
+- `--use-largepages`
+- `--use-openssl-ca`
+- `--v8-pool-size`
+- `--watch-path`
+- `--watch-preserve-output`
+- `--watch`
+- `--zero-fill-buffers`
<!-- node-options-node end -->
@@ -3266,19 +3235,19 @@ V8 options that are allowed are:
<!-- node-options-v8 start -->
-* `--abort-on-uncaught-exception`
-* `--disallow-code-generation-from-strings`
-* `--enable-etw-stack-walking`
-* `--expose-gc`
-* `--interpreted-frames-native-stack`
-* `--jitless`
-* `--max-old-space-size`
-* `--max-semi-space-size`
-* `--perf-basic-prof-only-functions`
-* `--perf-basic-prof`
-* `--perf-prof-unwinding-info`
-* `--perf-prof`
-* `--stack-trace-limit`
+- `--abort-on-uncaught-exception`
+- `--disallow-code-generation-from-strings`
+- `--enable-etw-stack-walking`
+- `--expose-gc`
+- `--interpreted-frames-native-stack`
+- `--jitless`
+- `--max-old-space-size`
+- `--max-semi-space-size`
+- `--perf-basic-prof-only-functions`
+- `--perf-basic-prof`
+- `--perf-prof-unwinding-info`
+- `--perf-prof`
+- `--stack-trace-limit`
<!-- node-options-v8 end -->
@@ -3446,23 +3415,12 @@ and the line lengths of the source file (in the key `lineLengths`).
"url": "./path-to-map.json",
"data": {
"version": 3,
- "sources": [
- "file:///absolute/path/to/original.js"
- ],
- "names": [
- "Foo",
- "console",
- "info"
- ],
+ "sources": ["file:///absolute/path/to/original.js"],
+ "names": ["Foo", "console", "info"],
"mappings": "MAAMA,IACJC,YAAaC",
"sourceRoot": "./"
},
- "lineLengths": [
- 13,
- 62,
- 38,
- 27
- ]
+ "lineLengths": [13, 62, 38, 27]
}
}
}
@@ -3470,7 +3428,7 @@ and the line lengths of the source file (in the key `lineLengths`).
### `NO_COLOR=<any>`
-[`NO_COLOR`][] is an alias for `NODE_DISABLE_COLORS`. The value of the
+[`NO_COLOR`][] is an alias for `NODE_DISABLE_COLORS`. The value of the
environment variable is arbitrary.
### `OPENSSL_CONF=file`
@@ -3552,12 +3510,12 @@ Asynchronous system APIs are used by Node.js whenever possible, but where they
do not exist, libuv's threadpool is used to create asynchronous node APIs based
on synchronous system APIs. Node.js APIs that use the threadpool are:
-* all `fs` APIs, other than the file watcher APIs and those that are explicitly
+- all `fs` APIs, other than the file watcher APIs and those that are explicitly
synchronous
-* asynchronous crypto APIs such as `crypto.pbkdf2()`, `crypto.scrypt()`,
+- asynchronous crypto APIs such as `crypto.pbkdf2()`, `crypto.scrypt()`,
`crypto.randomBytes()`, `crypto.randomFill()`, `crypto.generateKeyPair()`
-* `dns.lookup()`
-* all `zlib` APIs, other than those that are explicitly synchronous
+- `dns.lookup()`
+- all `zlib` APIs, other than those that are explicitly synchronous
Because libuv's threadpool has a fixed size, it means that if for whatever
reason any of these APIs takes a long time, other (seemingly unrelated) APIs
@@ -3723,7 +3681,6 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
[`--redirect-warnings`]: #--redirect-warningsfile
[`--require`]: #-r---require-module
[`AsyncLocalStorage`]: async_context.md#class-asynclocalstorage
-[`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait
[`Buffer`]: buffer.md#class-buffer
[`CRYPTO_secure_malloc_init`]: https://www.openssl.org/docs/man3.0/man3/CRYPTO_secure_malloc_init.html
[`ERR_INVALID_TYPESCRIPT_SYNTAX`]: errors.md#err_invalid_typescript_syntax
@@ -3746,7 +3703,6 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
[`tls.DEFAULT_MIN_VERSION`]: tls.md#tlsdefault_min_version
[`unhandledRejection`]: process.md#event-unhandledrejection
[`v8.startupSnapshot` API]: v8.md#startup-snapshot-api
-[`worker_threads.threadId`]: worker_threads.md#workerthreadid
[collecting code coverage from tests]: test.md#collecting-code-coverage
[conditional exports]: packages.md#conditional-exports
[context-aware]: addons.md#context-aware-addons
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index 0df7dce60058d518c9607094344461b60e540e60..f5f8ac77c848edf62b0a82f0644f61077a02aedd 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -3313,6 +3313,9 @@ Values other than `undefined`, `null`, integer numbers, and integer strings
<!-- YAML
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/52747
+ description: End-of-Life.
- version: v22.0.0
pr-url: https://github.com/nodejs/node/pull/51179
description: Runtime deprecation.
@@ -3323,9 +3326,9 @@ changes:
description: Documentation-only deprecation.
-->
-Type: Runtime
+Type: End-of-Life
-The [`--trace-atomics-wait`][] flag is deprecated because
+The `--trace-atomics-wait` flag has been removed because
it uses the V8 hook `SetAtomicsWaitCallback`,
that will be removed in a future V8 release.
@@ -3737,7 +3740,6 @@ deprecated, as their values are guaranteed to be identical to that of `process.f
[`--force-node-api-uncaught-exceptions-policy`]: cli.md#--force-node-api-uncaught-exceptions-policy
[`--pending-deprecation`]: cli.md#--pending-deprecation
[`--throw-deprecation`]: cli.md#--throw-deprecation
-[`--trace-atomics-wait`]: cli.md#--trace-atomics-wait
[`--unhandled-rejections`]: cli.md#--unhandled-rejectionsmode
[`Buffer.allocUnsafeSlow(size)`]: buffer.md#static-method-bufferallocunsafeslowsize
[`Buffer.from(array)`]: buffer.md#static-method-bufferfromarray
* `--trace-deprecation`
* `--trace-env-js-stack`
* `--trace-env-native-stack`
diff --git a/doc/node.1 b/doc/node.1
index 9f534746ef9d9c1c1ee2edd6c195573a2e228600..e01fc511a1034518c0fb9bc5fa925524aecad927 100644
--- a/doc/node.1
@@ -773,7 +43,7 @@ index 9f534746ef9d9c1c1ee2edd6c195573a2e228600..e01fc511a1034518c0fb9bc5fa925524
Print stack traces for deprecations.
.
diff --git a/src/node.cc b/src/node.cc
index 0ed78ab6b52906e980eebf1f625a1c7cbfc8097b..2ff08a9cb6124316049a91bda70cf6985045286a 100644
index 2f58a6fa69069dabb99b5ddb8011991b07fa5f02..9f6fa646ba6673f67f5f625e157ed850633a26da 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -226,44 +226,6 @@ void Environment::WaitForInspectorFrontendByOptions() {
@@ -840,10 +110,10 @@ index 0ed78ab6b52906e980eebf1f625a1c7cbfc8097b..2ff08a9cb6124316049a91bda70cf698
isolate_->SetPromiseHook(TracePromises);
}
diff --git a/src/node_options.cc b/src/node_options.cc
index 866f2a39a5e51a8bf434ccd54d76c685bcdd1502..2bedaa88582c369a4a420ff20a5204af96feb52e 100644
index 54b253aa54f5cdebdb04315f9c6c2506977555c0..acf390bd456c7ddfa6987e440fb45940aec6b1ff 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -758,10 +758,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
@@ -762,10 +762,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
"throw an exception on deprecations",
&EnvironmentOptions::throw_deprecation,
kAllowedInEnvvar);
@@ -855,7 +125,7 @@ index 866f2a39a5e51a8bf434ccd54d76c685bcdd1502..2bedaa88582c369a4a420ff20a5204af
"show stack traces on deprecations",
&EnvironmentOptions::trace_deprecation,
diff --git a/src/node_options.h b/src/node_options.h
index 41dd04f5e2b1cd54c32df70830389d44d7b39aa2..b10287d3eadc49b44e2e3fb8150a48be6866b0b4 100644
index 065457acfde6ba4d04ed570cc72005cfd2798fd5..150f833bb21bd6d37f652f0785a4a98f3de5f67d 100644
--- a/src/node_options.h
+++ b/src/node_options.h
@@ -203,7 +203,6 @@ class EnvironmentOptions : public Options {

View File

@@ -18,10 +18,10 @@ Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
diff --git a/doc/api/cli.md b/doc/api/cli.md
index 8105592764abca6036e8e029ca9b6a32402e7156..431a6aa7a2cf4d537cb719f15c2749254e0433b3 100644
index 1b42c5a7f4715e56fa5bc39cd6f78a76473406f2..114b7bbf6b1e105fc1696ed8a064065db73ff519 100644
--- a/doc/api/cli.md
+++ b/doc/api/cli.md
@@ -3270,7 +3270,6 @@ V8 options that are allowed are:
@@ -3350,7 +3350,6 @@ V8 options that are allowed are:
* `--disallow-code-generation-from-strings`
* `--enable-etw-stack-walking`
* `--expose-gc`
@@ -30,10 +30,10 @@ index 8105592764abca6036e8e029ca9b6a32402e7156..431a6aa7a2cf4d537cb719f15c274925
* `--jitless`
* `--max-old-space-size`
diff --git a/src/node_options.cc b/src/node_options.cc
index 620776c06d835eb1bfeed060751c570e8d435b29..866f2a39a5e51a8bf434ccd54d76c685bcdd1502 100644
index b22fbb0a285f6f323779d6ebb2b027a3990b031e..54b253aa54f5cdebdb04315f9c6c2506977555c0 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -980,11 +980,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
@@ -984,11 +984,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
"disallow eval and friends",
V8Option{},
kAllowedInEnvvar);
@@ -46,10 +46,10 @@ index 620776c06d835eb1bfeed060751c570e8d435b29..866f2a39a5e51a8bf434ccd54d76c685
"disable runtime allocation of executable memory",
V8Option{},
diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
index b1d5c44ceeeebc674938d85736aace2a6ef570e2..9e89200e9f6dfd89340cd04afb76e271ffc82b54 100644
index c5d74f40e7894980b45713c77cc36f836be73528..53bca572c3405c0357f868aae71fc2c82d973c04 100644
--- a/test/parallel/test-cli-node-options.js
+++ b/test/parallel/test-cli-node-options.js
@@ -73,7 +73,6 @@ if (common.hasCrypto) {
@@ -76,7 +76,6 @@ if (common.hasCrypto) {
expect('--abort_on-uncaught_exception', 'B\n');
expect('--disallow-code-generation-from-strings', 'B\n');
expect('--expose-gc', 'B\n');

View File

@@ -9,7 +9,7 @@ modules to sandboxed renderers.
TODO(codebytere): remove and replace with a public facing API.
diff --git a/src/node_binding.cc b/src/node_binding.cc
index c2ef9b36d5b2967c798c123b6cbbd099b15c2791..b5c0a93d83ab4d4f6792d0eb648e7198de874bcf 100644
index 6c337232149ccb8bdb1188e72d59a052b1cb79c1..44ad4a480a33a2c39494a7d961318270a25620d8 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -653,6 +653,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {

View File

@@ -1,42 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Yang Liu <ouyangliu.leo@gmail.com>
Date: Wed, 5 Mar 2025 17:22:39 +0800
Subject: feat: add oom_error_callback in node::IsolateSettings
Expose v8::OOMErrorCallback to allow setting OOM error handler outside Node.js
As described in this issue https://github.com/electron/electron/issues/45894,
Electron fails to capture js heap oom because node::OOMErrorHandler just
terminates the process without raising an exception.
To fix this issue, provide the interface oom_error_callback to enable a
custom oom error callback set from Electron.
diff --git a/src/api/environment.cc b/src/api/environment.cc
index fc9b056d2f7e25109100fbde5f3ab0aebc8c619a..9b155213ce301df7e396a4a113992499fc7e9910 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -241,7 +241,10 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
auto* fatal_error_cb = s.fatal_error_callback ?
s.fatal_error_callback : OnFatalError;
isolate->SetFatalErrorHandler(fatal_error_cb);
- isolate->SetOOMErrorHandler(OOMErrorHandler);
+
+ auto* oom_error_cb = s.oom_error_callback ?
+ s.oom_error_callback : OOMErrorHandler;
+ isolate->SetOOMErrorHandler(oom_error_cb);
if ((s.flags & SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK) == 0) {
auto* prepare_stack_trace_cb = s.prepare_stack_trace_callback ?
diff --git a/src/node.h b/src/node.h
index afb26ec5690ccd65a3c36f8b8a1b2de416b9d843..98ad0ea649eaef43d1f5231f7bc4044e100e08d7 100644
--- a/src/node.h
+++ b/src/node.h
@@ -489,6 +489,7 @@ struct IsolateSettings {
v8::Isolate::AbortOnUncaughtExceptionCallback
should_abort_on_uncaught_exception_callback = nullptr;
v8::FatalErrorCallback fatal_error_callback = nullptr;
+ v8::OOMErrorCallback oom_error_callback = nullptr;
v8::PrepareStackTraceCallback prepare_stack_trace_callback = nullptr;
// Miscellaneous callbacks

View File

@@ -1,43 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Thu, 6 Mar 2025 19:31:29 -0600
Subject: fix: -Wnonnull warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes this warning:
> 2025-03-07T01:05:01.8637705Z ../../third_party/electron_node/src/debug_utils.cc(257,12): error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
> 2025-03-07T01:05:01.8638267Z 257 | return nullptr;
> 2025-03-07T01:05:01.8638481Z | ^~~~~~~
> 2025-03-07T01:05:01.8638700Z 1 error generated.
Not sure why this warning was never triggered before; `git blame`
indicates this code hasn't changed in ages:
> c40a8273ef2 (Michaël Zasso 2024-05-10 09:50:20 +0200 255) #endif // DEBUG
> 8e2d33f1562 (Anna Henningsen 2018-06-07 16:54:29 +0200 256) }
> 247b5130595 (Refael Ackermann 2018-10-22 15:07:00 -0400 257) return nullptr;
> 247b5130595 (Refael Ackermann 2018-10-22 15:07:00 -0400 258) }
Presumably this is failing in this Chromium roll due to a
clang version bump.
We should remove this patch after upstreaming it.
Upstream PR: https://github.com/nodejs/node/pull/57354
diff --git a/src/debug_utils.cc b/src/debug_utils.cc
index c8b3b11ee34d7ac98163aa563fd7f6f1fb0a3b79..8a85e066fd9e6f3d6131eca89d52495f904cd5a6 100644
--- a/src/debug_utils.cc
+++ b/src/debug_utils.cc
@@ -254,7 +254,7 @@ class Win32SymbolDebuggingContext final : public NativeSymbolDebuggingContext {
USE(GetLastError());
#endif // DEBUG
}
- return nullptr;
+ return {};
}
SymbolInfo LookupSymbol(void* address) override {

View File

@@ -7,10 +7,10 @@ common.gypi is a file that's included in the node header bundle, despite
the fact that we do not build node with gyp.
diff --git a/common.gypi b/common.gypi
index 62f26bb07d27a02aedf18fdd1191b282f9340cac..5d74876ab28f8c10bb9543f7652478514414d8d2 100644
index 372409f4b09cc3b3be9809f697816498e5c021fe..f2a45f0f0bbfce93e61d3696a18425af4d022a00 100644
--- a/common.gypi
+++ b/common.gypi
@@ -88,6 +88,23 @@
@@ -90,6 +90,23 @@
##### end V8 defaults #####

View File

@@ -53,10 +53,10 @@ index 2879e5cf541fb4d226cfd7cc0fe367ca448fb926..03082f0ec4f91382933eec48e77331cd
const maybeMain = resolvedOption <= legacyMainResolveExtensionsIndexes.kResolvedByMainIndexNode ?
packageConfig.main || './' : '';
diff --git a/src/node_file.cc b/src/node_file.cc
index 1d22e19f16d5ad82466b0724971b2e4a685682f7..3d7e303741a73134e140152bed637fe5ae8bc1db 100644
index a492b3aa113c4e1d50cc42721bd5eb58380a6264..c7915e2c8161a5d0fa05ccce368ce9c44345c05d 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -3220,13 +3220,25 @@ static void CpSyncCheckPaths(const FunctionCallbackInfo<Value>& args) {
@@ -3237,13 +3237,25 @@ static void CpSyncCheckPaths(const FunctionCallbackInfo<Value>& args) {
}
BindingData::FilePathIsFileReturnType BindingData::FilePathIsFile(
@@ -83,7 +83,7 @@ index 1d22e19f16d5ad82466b0724971b2e4a685682f7..3d7e303741a73134e140152bed637fe5
uv_fs_t req;
int rc = uv_fs_stat(env->event_loop(), &req, file_path.c_str(), nullptr);
@@ -3284,6 +3296,11 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
@@ -3301,6 +3313,11 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
std::optional<std::string> initial_file_path;
std::string file_path;
@@ -95,7 +95,7 @@ index 1d22e19f16d5ad82466b0724971b2e4a685682f7..3d7e303741a73134e140152bed637fe5
if (args.Length() >= 2 && args[1]->IsString()) {
auto package_config_main = Utf8Value(isolate, args[1]).ToString();
@@ -3304,7 +3321,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
@@ -3321,7 +3338,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
BufferValue buff_file_path(isolate, local_file_path);
ToNamespacedPath(env, &buff_file_path);
@@ -104,7 +104,7 @@ index 1d22e19f16d5ad82466b0724971b2e4a685682f7..3d7e303741a73134e140152bed637fe5
case BindingData::FilePathIsFileReturnType::kIsFile:
return args.GetReturnValue().Set(i);
case BindingData::FilePathIsFileReturnType::kIsNotFile:
@@ -3341,7 +3358,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
@@ -3358,7 +3375,7 @@ void BindingData::LegacyMainResolve(const FunctionCallbackInfo<Value>& args) {
BufferValue buff_file_path(isolate, local_file_path);
ToNamespacedPath(env, &buff_file_path);

View File

@@ -44,10 +44,10 @@ index 59b5a16f1309a5e4055bccfdb7a529045ad30402..bfdaf6211466a01b64b7942f7b16c480
let filename = call.getFileName();
const line = call.getLineNumber() - 1;
diff --git a/src/node_options.cc b/src/node_options.cc
index 3608ab2b4aeb09e985ca98e23f2dff23567ade71..620776c06d835eb1bfeed060751c570e8d435b29 100644
index 23cb558a22b4462f5ce4f74833d25c7f712f8139..b22fbb0a285f6f323779d6ebb2b027a3990b031e 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -1527,14 +1527,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
@@ -1535,14 +1535,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
}
Isolate* isolate = args.GetIsolate();

View File

@@ -12,7 +12,7 @@ This can be removed/refactored once Node.js upgrades to a version of V8
containing the above CL.
diff --git a/src/node.cc b/src/node.cc
index 2ff08a9cb6124316049a91bda70cf6985045286a..5de93329cbd40a2ca314d602b123092ed15741c5 100644
index 9f6fa646ba6673f67f5f625e157ed850633a26da..63a462876c00588d22abdd6ed8ee41ecf6590d03 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -1173,7 +1173,7 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,

View File

@@ -11,7 +11,7 @@ before it's acceptable to upstream, as this patch comments out a couple
of tests that upstream probably cares about.
diff --git a/test/common/index.js b/test/common/index.js
index 92c7294e6f6298f511b5a289e1e0e3a4be68cc77..63a350c5ed912a785b042a238c064c98ed423af4 100644
index 8f5af57a83dc6b426f1b11bd2e3a8c6c0f2d9a85..f6e00c9f3f3ac4b42662eed6c8d190586f92ab99 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -56,6 +56,8 @@ const hasCrypto = Boolean(process.versions.openssl) &&
@@ -23,7 +23,7 @@ index 92c7294e6f6298f511b5a289e1e0e3a4be68cc77..63a350c5ed912a785b042a238c064c98
function parseTestFlags(filename = process.argv[1]) {
// The copyright notice is relatively big and the flags could come afterwards.
const bytesToRead = 1500;
@@ -889,6 +891,7 @@ const common = {
@@ -901,6 +903,7 @@ const common = {
mustNotMutateObjectDeep,
mustSucceed,
nodeProcessAborted,
@@ -294,24 +294,6 @@ index 48cd1ed4df61aaddeee8785cb90f83bdd9628187..a18aeb2bdffcc7a7e9ef12328b849994
});
// No-pad encrypted string should return the same:
diff --git a/test/parallel/test-crypto-prime.js b/test/parallel/test-crypto-prime.js
index 5ffdc1394282be046150e3759f82f8787f5604f7..e1c7a7b4824a2df20a405355696022398216fa4f 100644
--- a/test/parallel/test-crypto-prime.js
+++ b/test/parallel/test-crypto-prime.js
@@ -259,11 +259,11 @@ for (const checks of [-(2 ** 31), -1, 2 ** 31, 2 ** 32 - 1, 2 ** 32, 2 ** 50]) {
bytes[0] = 0x1;
assert.throws(() => checkPrime(bytes, common.mustNotCall()), {
code: 'ERR_OSSL_BN_BIGNUM_TOO_LONG',
- message: /bignum too long/
+ message: /bignum[_ ]too[_ ]long/i
});
assert.throws(() => checkPrimeSync(bytes), {
code: 'ERR_OSSL_BN_BIGNUM_TOO_LONG',
- message: /bignum too long/
+ message: /bignum[_ ]too[_ ]long/i
});
}
diff --git a/test/parallel/test-crypto-rsa-dsa.js b/test/parallel/test-crypto-rsa-dsa.js
index dcd5045daaf58c60e27c1e2f7941033302241339..6ac75565792b92a97c622baba73f821d754b8d01 100644
--- a/test/parallel/test-crypto-rsa-dsa.js
@@ -353,10 +335,10 @@ index dcd5045daaf58c60e27c1e2f7941033302241339..6ac75565792b92a97c622baba73f821d
// DSA signatures vary across runs so there is no static string to verify
diff --git a/test/parallel/test-crypto-scrypt.js b/test/parallel/test-crypto-scrypt.js
index 338a19b0e88ad6f08d2f6b6a5d38b9980996ce11..a4ee215575d072450ba66c558ddca88bfb23d85f 100644
index 03a18c7522531c7317f12705550117dc389a0245..2f0f46f2c6ddc62de89877cfa0ca80949a0f4c5e 100644
--- a/test/parallel/test-crypto-scrypt.js
+++ b/test/parallel/test-crypto-scrypt.js
@@ -178,7 +178,7 @@ for (const options of bad) {
@@ -176,7 +176,7 @@ for (const options of bad) {
for (const options of toobig) {
const expected = {
@@ -599,6 +581,49 @@ index 6f88e81e9ff29defe73800fc038b0d96d1ebd846..c0b92e2bdf86d3d2638c973f8be3110d
};
// Create TLS1.2 server
diff --git a/test/parallel/test-tls-alert-handling.js b/test/parallel/test-tls-alert-handling.js
index cba5bebaa29b6f8ac4fd0fcedaadb2f7bb3eb321..019d95df499892b14ab088f99013ee32c432779c 100644
--- a/test/parallel/test-tls-alert-handling.js
+++ b/test/parallel/test-tls-alert-handling.js
@@ -35,7 +35,7 @@ let iter = 0;
const errorHandler = common.mustCall((err) => {
let expectedErrorCode = 'ERR_SSL_WRONG_VERSION_NUMBER';
- let expectedErrorReason = 'wrong version number';
+ let expectedErrorReason = /wrong[\s_]version[\s_]number/i;
if (hasOpenSSL(3, 2)) {
expectedErrorCode = 'ERR_SSL_PACKET_LENGTH_TOO_LONG';
expectedErrorReason = 'packet length too long';
@@ -43,8 +43,8 @@ const errorHandler = common.mustCall((err) => {
assert.strictEqual(err.code, expectedErrorCode);
assert.strictEqual(err.library, 'SSL routines');
- if (!hasOpenSSL3) assert.strictEqual(err.function, 'ssl3_get_record');
- assert.strictEqual(err.reason, expectedErrorReason);
+ if (!hasOpenSSL3 && !common.openSSLIsBoringSSL) assert.strictEqual(err.function, 'ssl3_get_record');
+ assert.match(err.reason, expectedErrorReason);
errorReceived = true;
if (canCloseServer())
server.close();
@@ -98,15 +98,15 @@ function sendBADTLSRecord() {
}));
client.on('error', common.mustCall((err) => {
let expectedErrorCode = 'ERR_SSL_TLSV1_ALERT_PROTOCOL_VERSION';
- let expectedErrorReason = 'tlsv1 alert protocol version';
+ let expectedErrorReason = /tlsv1[\s_]alert[\s_]protocol[\s_]version/i;
if (hasOpenSSL(3, 2)) {
expectedErrorCode = 'ERR_SSL_TLSV1_ALERT_RECORD_OVERFLOW';
expectedErrorReason = 'tlsv1 alert record overflow';
}
assert.strictEqual(err.code, expectedErrorCode);
assert.strictEqual(err.library, 'SSL routines');
- if (!hasOpenSSL3)
+ if (!hasOpenSSL3 && !common.openSSLIsBoringSSL)
assert.strictEqual(err.function, 'ssl3_read_bytes');
- assert.strictEqual(err.reason, expectedErrorReason);
+ assert.match(err.reason, expectedErrorReason);
}));
}
diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js
index b1eab88fd6517e3698934dea17752ef2bb8d8d54..3ad6db20316baa8490e3787dd55903b58a54ad06 100644
--- a/test/parallel/test-tls-getprotocol.js

View File

@@ -19,10 +19,10 @@ index c9d4a3536d0f60375ae623b48ca2fa7095c88d42..d818320fbbc430d06a0c2852e4723981
context = { __proto__: context, source };
}
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index 0caba80bb213e0edfb1f834250f895ccc05d0d1c..6feab19d24a3524e36c5ed3bbac53cba0fa298c7 100644
index 49aacb6262502ced54e817f99dd596db85b9659c..f9f065bb743275e9b2ce71375e6a9f06e00c0f36 100644
--- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js
@@ -286,6 +286,9 @@ function cjsPreparseModuleExports(filename, source) {
@@ -291,6 +291,9 @@ function cjsPreparseModuleExports(filename, source, isMain, format) {
if (module && module[kModuleExportNames] !== undefined) {
return { module, exportNames: module[kModuleExportNames] };
}

View File

@@ -8,10 +8,10 @@ an API override to replace the native `ReadFileSync` in the `modules`
binding.
diff --git a/src/env_properties.h b/src/env_properties.h
index 9f89823170782242093bc5ee0df6a2a2ef5b919f..b9374ee1acceb3d0aab51c6c5ae6a79be1cc71a9 100644
index ba8c80ff2842c63f16cae51cfa8084617bb35bf5..820aebd18d22bcef4992b09ffc8924e9b758fd3e 100644
--- a/src/env_properties.h
+++ b/src/env_properties.h
@@ -478,6 +478,7 @@
@@ -485,6 +485,7 @@
V(maybe_cache_generated_source_map, v8::Function) \
V(messaging_deserialize_create_object, v8::Function) \
V(message_port, v8::Object) \

View File

@@ -70,19 +70,19 @@ index bfd9bd3d127404de1cbb6f30c43ab0342590759d..9e7d8ef0adef3b68a3ec186e4b218f59
const packageConfig = packageJsonReader.read(packageJSONPath, { __proto__: null, specifier, base, isESM: true });
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index a587246e329b41f33a3fdfe5ef92910915911611..1b94d923b6d83cc7806d793497a4f9f978c5938c 100644
index 7dcd7afe8ce3c25ceb314cdf15c330f3d66eb84f..4445bcc4c4c6c6f87ac45e693012a18a93739f9b 100644
--- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js
@@ -182,7 +182,7 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) {
@@ -186,7 +186,7 @@ function createCJSModuleWrap(url, source, isMain, format, loadCJS = loadCJSModul
const { exportNames, module } = cjsPreparseModuleExports(filename, source);
const { exportNames, module } = cjsPreparseModuleExports(filename, source, isMain, format);
cjsCache.set(url, module);
- const namesWithDefault = exportNames.has('default') ?
+ const namesWithDefault = filename === 'electron' ? ['default', ...Object.keys(module.exports)] : exportNames.has('default') ?
[...exportNames] : ['default', ...exportNames];
if (isMain) {
@@ -204,8 +204,8 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) {
@@ -208,8 +208,8 @@ function createCJSModuleWrap(url, source, isMain, format, loadCJS = loadCJSModul
({ exports } = module);
}
for (const exportName of exportNames) {
@@ -93,8 +93,8 @@ index a587246e329b41f33a3fdfe5ef92910915911611..1b94d923b6d83cc7806d793497a4f9f9
continue;
}
// We might trigger a getter -> dont fail.
@@ -239,6 +239,10 @@ translators.set('require-commonjs', (url, source, isMain) => {
return createCJSModuleWrap(url, source);
@@ -243,6 +243,10 @@ translators.set('require-commonjs', (url, source, isMain) => {
return createCJSModuleWrap(url, source, isMain, 'commonjs');
});
+translators.set('electron', () => {

View File

@@ -238,20 +238,10 @@ index d94f6e1c82c4a62547b3b395f375c86ce4deb5de..b81b9005365272217c77e2b9289bd9f8
X509View ca(sk_X509_value(peer_certs.get(), i));
if (!cert->view().isIssuedBy(ca)) continue;
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
index c89d591c6804ab7d41199d61452d10d12cdf7398..05740c7dc599954bca0779b8c8d6bd615183288a 100644
index a054e4c1285208c9ba8b9679c284f459f1ace690..3de8ef4fafcdbdc2cb0ce31de162663d5272340f 100644
--- a/src/crypto/crypto_context.cc
+++ b/src/crypto/crypto_context.cc
@@ -26,7 +26,9 @@ using ncrypto::BIOPointer;
using ncrypto::ClearErrorOnReturn;
using ncrypto::CryptoErrorList;
using ncrypto::DHPointer;
+#ifndef OPENSSL_NO_ENGINE
using ncrypto::EnginePointer;
+#endif // !OPENSSL_NO_ENGINE
using ncrypto::EVPKeyPointer;
using ncrypto::MarkPopErrorOnReturn;
using ncrypto::SSLPointer;
@@ -105,7 +107,7 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,
@@ -123,7 +123,7 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,
// the CA certificates.
SSL_CTX_clear_extra_chain_certs(ctx);
@@ -260,7 +250,7 @@ index c89d591c6804ab7d41199d61452d10d12cdf7398..05740c7dc599954bca0779b8c8d6bd61
X509* ca = sk_X509_value(extra_certs, i);
// NOTE: Increments reference count on `ca`
@@ -931,11 +933,12 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo<Value>& args) {
@@ -1584,11 +1584,12 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo<Value>& args) {
// If the user specified "auto" for dhparams, the JavaScript layer will pass
// true to this function instead of the original string. Any other string
// value will be interpreted as custom DH parameters below.
@@ -274,7 +264,7 @@ index c89d591c6804ab7d41199d61452d10d12cdf7398..05740c7dc599954bca0779b8c8d6bd61
DHPointer dh;
{
BIOPointer bio(LoadBIO(env, args[0]));
@@ -1161,7 +1164,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
@@ -1814,7 +1815,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
}
// Add CA certs too
@@ -416,7 +406,7 @@ index 471fee77531139ce988292470dff443fdfb05b07..931f7c2ae3d7e12afce471545d610d22
return EVPKeyCtxPointer();
diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc
index f66c57b1079af6cd040dc6d11e72f353507b75e5..abd2bccb9669e06dd8355f66220f8b06c8e863dc 100644
index b38a9a377738fd5fe6cc89c3a27c403bf6a97715..0cd43c2005b431e180b7483cb89825a75e1fe03f 100644
--- a/src/crypto/crypto_keys.cc
+++ b/src/crypto/crypto_keys.cc
@@ -949,6 +949,7 @@ void KeyObjectHandle::GetAsymmetricKeyType(
@@ -469,20 +459,20 @@ index 05a3882c7e17d78e27aabb29891aa250789a47c0..1f2fccce6ed8f14525557644e0bdd130
if (target
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
index e255288f6e013ce122f317c415d73d9c93d38580..25fa9af8153852f49d5289aa253f3c8f7268d89c 100644
index 7c548d32b40365343f0e208c3aa856a1c847f4c3..6346f8f7199cf7b7d3736c59571606fff102fbb6 100644
--- a/src/crypto/crypto_util.cc
+++ b/src/crypto/crypto_util.cc
@@ -29,7 +29,9 @@ namespace node {
using ncrypto::BignumPointer;
using ncrypto::BIOPointer;
using ncrypto::CryptoErrorList;
+#ifndef OPENSSL_NO_ENGINE
using ncrypto::EnginePointer;
+#endif // !OPENSSL_NO_ENGINE
using ncrypto::EVPKeyCtxPointer;
using v8::ArrayBuffer;
using v8::BackingStore;
@@ -502,24 +504,15 @@ Maybe<void> Decorate(Environment* env,
@@ -207,7 +207,8 @@ void TestFipsCrypto(const v8::FunctionCallbackInfo<v8::Value>& args) {
void GetOpenSSLSecLevelCrypto(const FunctionCallbackInfo<Value>& args) {
// for BoringSSL assume the same as the default
- int sec_level = OPENSSL_TLS_SECURITY_LEVEL;
+ // value of OPENSSL_TLS_SECURITY_LEVEL.
+ int sec_level = 1;
#ifndef OPENSSL_IS_BORINGSSL
Environment* env = Environment::GetCurrent(args);
@@ -527,24 +528,15 @@ Maybe<void> Decorate(Environment* env,
V(BIO) \
V(PKCS7) \
V(X509V3) \
@@ -508,7 +498,7 @@ index e255288f6e013ce122f317c415d73d9c93d38580..25fa9af8153852f49d5289aa253f3c8f
V(USER) \
#define V(name) case ERR_LIB_##name: lib = #name "_"; break;
@@ -661,7 +654,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -686,7 +678,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsUint32());
Environment* env = Environment::GetCurrent(args);
uint32_t len = args[0].As<Uint32>()->Value();
@@ -517,7 +507,7 @@ index e255288f6e013ce122f317c415d73d9c93d38580..25fa9af8153852f49d5289aa253f3c8f
if (data == nullptr) {
// There's no memory available for the allocation.
// Return nothing.
@@ -672,7 +665,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -697,7 +689,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
data,
len,
[](void* data, size_t len, void* deleter_data) {
@@ -526,7 +516,7 @@ index e255288f6e013ce122f317c415d73d9c93d38580..25fa9af8153852f49d5289aa253f3c8f
},
data);
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);
@@ -680,10 +673,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -705,10 +697,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
}
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
@@ -540,7 +530,7 @@ index e255288f6e013ce122f317c415d73d9c93d38580..25fa9af8153852f49d5289aa253f3c8f
} // namespace
diff --git a/src/env.h b/src/env.h
index 1239cbdbf2d375a50ada37ee0ed5592c751d4c5c..aed066852d7c257076cc7ca8b173fd2a3a353a00 100644
index b6bdff9b8580d2588a39f00b594c4c480157d78a..cfe917c797a6e4bb0f0284ec56be82637f840129 100644
--- a/src/env.h
+++ b/src/env.h
@@ -50,7 +50,7 @@
@@ -552,7 +542,7 @@ index 1239cbdbf2d375a50ada37ee0ed5592c751d4c5c..aed066852d7c257076cc7ca8b173fd2a
#include <openssl/evp.h>
#endif
@@ -1071,7 +1071,7 @@ class Environment final : public MemoryRetainer {
@@ -1073,7 +1073,7 @@ class Environment final : public MemoryRetainer {
kExitInfoFieldCount
};
@@ -562,7 +552,7 @@ index 1239cbdbf2d375a50ada37ee0ed5592c751d4c5c..aed066852d7c257076cc7ca8b173fd2a
// We declare another alias here to avoid having to include crypto_util.h
using EVPMDPointer = DeleteFnPtr<EVP_MD, EVP_MD_free>;
diff --git a/src/node_metadata.h b/src/node_metadata.h
index c59e65ad1fe3fac23f1fc25ca77e6133d1ccaccd..f2f07434e076e2977755ef7dac7d489aedb760b0 100644
index 6f8cb433ff8059c63d5cf16c8783139ae92fbf61..603ac3dde7d1a1109afbc451b69c8d0935b81641 100644
--- a/src/node_metadata.h
+++ b/src/node_metadata.h
@@ -6,7 +6,7 @@
@@ -575,7 +565,7 @@ index c59e65ad1fe3fac23f1fc25ca77e6133d1ccaccd..f2f07434e076e2977755ef7dac7d489a
#if NODE_OPENSSL_HAS_QUIC
#include <openssl/quic.h>
diff --git a/src/node_options.cc b/src/node_options.cc
index 1d81079a9b7d8a69ad2d87835090be88ae507bd8..3608ab2b4aeb09e985ca98e23f2dff23567ade71 100644
index 1444acd59d42f64831cead5f153419f7c12a88bf..23cb558a22b4462f5ce4f74833d25c7f712f8139 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -6,7 +6,7 @@
@@ -588,7 +578,7 @@ index 1d81079a9b7d8a69ad2d87835090be88ae507bd8..3608ab2b4aeb09e985ca98e23f2dff23
#endif
diff --git a/src/node_options.h b/src/node_options.h
index 621f5eca96b10685734a39e56cce7cee6c8a25bf..41dd04f5e2b1cd54c32df70830389d44d7b39aa2 100644
index e68a41b60832c4b000e17dd15ce16c1bdaf4b54b..065457acfde6ba4d04ed570cc72005cfd2798fd5 100644
--- a/src/node_options.h
+++ b/src/node_options.h
@@ -11,7 +11,7 @@
@@ -600,24 +590,3 @@ index 621f5eca96b10685734a39e56cce7cee6c8a25bf..41dd04f5e2b1cd54c32df70830389d44
#include "openssl/opensslv.h"
#endif
diff --git a/unofficial.gni b/unofficial.gni
index a2f3a769ceaa08db6d7438223884dc5aeab1340d..08603eaef2da51fd92f9bf977647b56409eff48c 100644
--- a/unofficial.gni
+++ b/unofficial.gni
@@ -151,7 +151,6 @@ template("node_gn_build") {
]
deps = [
":run_node_js2c",
- "deps/brotli",
"deps/cares",
"deps/histogram",
"deps/llhttp",
@@ -161,6 +160,8 @@ template("node_gn_build") {
"deps/sqlite",
"deps/uvwasi",
"//third_party/zlib",
+ "//third_party/brotli:dec",
+ "//third_party/brotli:enc",
"$node_simdutf_path",
"$node_v8_path:v8_libplatform",
]

View File

@@ -60,7 +60,7 @@ index 9e7d8ef0adef3b68a3ec186e4b218f591aa69266..2879e5cf541fb4d226cfd7cc0fe367ca
});
const { search, hash } = resolved;
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index 1b94d923b6d83cc7806d793497a4f9f978c5938c..0caba80bb213e0edfb1f834250f895ccc05d0d1c 100644
index 4445bcc4c4c6c6f87ac45e693012a18a93739f9b..49aacb6262502ced54e817f99dd596db85b9659c 100644
--- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js
@@ -24,7 +24,7 @@ const {
@@ -69,10 +69,10 @@ index 1b94d923b6d83cc7806d793497a4f9f978c5938c..0caba80bb213e0edfb1f834250f895cc
const assert = require('internal/assert');
-const { readFileSync } = require('fs');
+const fs = require('fs');
const { dirname, extname, isAbsolute } = require('path');
const { dirname, extname } = require('path');
const {
assertBufferSource,
@@ -268,7 +268,7 @@ translators.set('commonjs', function commonjsStrategy(url, source, isMain) {
@@ -272,7 +272,7 @@ translators.set('commonjs', function commonjsStrategy(url, source, isMain) {
try {
// We still need to read the FS to detect the exports.
@@ -81,12 +81,3 @@ index 1b94d923b6d83cc7806d793497a4f9f978c5938c..0caba80bb213e0edfb1f834250f895cc
} catch {
// Continue regardless of error.
}
@@ -335,7 +335,7 @@ function cjsPreparseModuleExports(filename, source) {
isAbsolute(resolved)) {
// TODO: this should be calling the `load` hook chain to get the source
// (and fallback to reading the FS only if the source is nullish).
- const source = readFileSync(resolved, 'utf-8');
+ const source = fs.readFileSync(resolved, 'utf-8');
const { exportNames: reexportNames } = cjsPreparseModuleExports(resolved, source);
for (const name of reexportNames) {
exportNames.add(name);

View File

@@ -86,7 +86,7 @@ index 13263149c111beede83b7063fa54f56655aea54c..99068098e1867af4846e18a5d039a256
NODE_DEFINE_CONSTANT(target, ETIMEDOUT);
#endif
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 609601328f7f5ff5f121151e81c2df82e7ef4253..6b9b944c11af917fe4e296961e6ed7df7b89a123 100644
index 5f51add4cdf68a9487edfc9382f586cc94539571..befb642f1effa3c4139e4cd99ff64d9c5175fd72 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -862,10 +862,6 @@ const char* errno_string(int errorno) {

View File

@@ -48,7 +48,7 @@ index 867a1c4aca54b9d41490d23a5eb55088b7e941cc..09f4c65a18efea262b1f854f993c6f18
static v8::CFunction fast_equal(v8::CFunction::Make(FastTimingSafeEqual));
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index cd51d9acf9540d506ec35812b9d2c530fce24912..07068344262f7b73a83073d4da75bffe8b747a61 100644
index 10659fbf57e4535736fc001c0dbdd9b93e8f60f1..c0bd975bae23d1c05ace42fd8c9846ee4d8ef8f0 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -44,6 +44,14 @@
@@ -74,7 +74,7 @@ index cd51d9acf9540d506ec35812b9d2c530fce24912..07068344262f7b73a83073d4da75bffe
using v8::FunctionCallbackInfo;
using v8::Global;
using v8::HandleScope;
@@ -582,19 +589,24 @@ void SlowCopy(const FunctionCallbackInfo<Value>& args) {
@@ -586,19 +593,24 @@ void SlowCopy(const FunctionCallbackInfo<Value>& args) {
// Assume caller has properly validated args.
uint32_t FastCopy(Local<Value> receiver,
@@ -107,7 +107,7 @@ index cd51d9acf9540d506ec35812b9d2c530fce24912..07068344262f7b73a83073d4da75bffe
return to_copy;
}
@@ -858,19 +870,17 @@ void Compare(const FunctionCallbackInfo<Value> &args) {
@@ -867,19 +879,17 @@ void Compare(const FunctionCallbackInfo<Value> &args) {
}
int32_t FastCompare(v8::Local<v8::Value>,
@@ -135,7 +135,7 @@ index cd51d9acf9540d506ec35812b9d2c530fce24912..07068344262f7b73a83073d4da75bffe
}
static v8::CFunction fast_compare(v8::CFunction::Make(FastCompare));
@@ -1141,14 +1151,13 @@ void SlowIndexOfNumber(const FunctionCallbackInfo<Value>& args) {
@@ -1150,14 +1160,13 @@ void SlowIndexOfNumber(const FunctionCallbackInfo<Value>& args) {
}
int32_t FastIndexOfNumber(v8::Local<v8::Value>,
@@ -153,7 +153,7 @@ index cd51d9acf9540d506ec35812b9d2c530fce24912..07068344262f7b73a83073d4da75bffe
}
static v8::CFunction fast_index_of_number(
@@ -1501,21 +1510,31 @@ void SlowWriteString(const FunctionCallbackInfo<Value>& args) {
@@ -1511,21 +1520,31 @@ void SlowWriteString(const FunctionCallbackInfo<Value>& args) {
template <encoding encoding>
uint32_t FastWriteString(Local<Value> receiver,
@@ -194,10 +194,10 @@ index cd51d9acf9540d506ec35812b9d2c530fce24912..07068344262f7b73a83073d4da75bffe
static v8::CFunction fast_write_string_ascii(
diff --git a/src/node_external_reference.h b/src/node_external_reference.h
index 8d49a119c218323674e29a522ecf71bd22cdaf1b..d39693f2f45f39e45960453112b0f6460a1b3a4d 100644
index bb007dbdcce486659afeed07b78103e44b00307b..314a4ded6908a94107de1ae1e550b7d46afdce75 100644
--- a/src/node_external_reference.h
+++ b/src/node_external_reference.h
@@ -40,16 +40,16 @@ using CFunctionCallbackWithStrings =
@@ -43,16 +43,16 @@ using CFunctionCallbackWithStrings =
const v8::FastOneByteString& base);
using CFunctionCallbackWithTwoUint8Arrays =
int32_t (*)(v8::Local<v8::Value>,
@@ -219,7 +219,7 @@ index 8d49a119c218323674e29a522ecf71bd22cdaf1b..d39693f2f45f39e45960453112b0f646
uint32_t,
int64_t,
bool);
@@ -68,18 +68,20 @@ using CFunctionWithBool = void (*)(v8::Local<v8::Value>,
@@ -71,18 +71,20 @@ using CFunctionWithBool = void (*)(v8::Local<v8::Value>,
using CFunctionWriteString =
uint32_t (*)(v8::Local<v8::Value> receiver,
@@ -246,7 +246,7 @@ index 8d49a119c218323674e29a522ecf71bd22cdaf1b..d39693f2f45f39e45960453112b0f646
// This class manages the external references from the V8 heap
// to the C++ addresses in Node.js.
diff --git a/src/util.h b/src/util.h
index 0d4676ddade8d91d101b6aeb8763886a234f0bae..7af9ed01a919927ae3897d4989206ec23cfe50d3 100644
index 48d3c7b8a304049cdb4d4ab2c027b300dc533dc0..f9d5a5b36701b3c65fda65ed8920521ff68e32cd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -59,6 +59,7 @@
@@ -257,7 +257,7 @@ index 0d4676ddade8d91d101b6aeb8763886a234f0bae..7af9ed01a919927ae3897d4989206ec2
#ifdef _WIN32
/* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */
@@ -579,6 +580,16 @@ class BufferValue : public MaybeStackBuffer<char> {
@@ -584,6 +585,16 @@ class BufferValue : public MaybeStackBuffer<char> {
static_cast<char*>(name->Buffer()->Data()) + name##_offset; \
if (name##_length > 0) CHECK_NE(name##_data, nullptr);

View File

@@ -11,7 +11,7 @@ This patch can be removed when we upgrade to a V8 version that
contains the above CL.
diff --git a/src/node.cc b/src/node.cc
index f4365c0eda7330bd02a921608951902f41004f77..b2b10ffb572f010992f221de752618fd56b5d50e 100644
index a0f1deadfc58f18f23467889680219360386f9dd..8da5f5344051663f92d72848fbac9d041ac4fac3 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -808,7 +808,7 @@ static ExitCode ProcessGlobalArgsInternal(std::vector<std::string>* args,

View File

@@ -6,10 +6,10 @@ Subject: Pass all globals through "require"
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 62c33730ed17cb98b6dd8d69b61360a419518ba5..9b5772fe9b8babbb892c7a5ec79258472da55a76 100644
index 33385fa792b71ea3802904dd3c59ce845342c595..92b368394e17a9257578cd5b7422391689732d6d 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -185,6 +185,13 @@ const {
@@ -200,6 +200,13 @@ const {
CHAR_FORWARD_SLASH,
} = require('internal/constants');
@@ -23,7 +23,7 @@ index 62c33730ed17cb98b6dd8d69b61360a419518ba5..9b5772fe9b8babbb892c7a5ec7925847
const {
isProxy,
} = require('internal/util/types');
@@ -1549,10 +1556,12 @@ Module.prototype._compile = function(content, filename, format) {
@@ -1725,10 +1732,12 @@ Module.prototype._compile = function(content, filename, format) {
if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) {
const { callAndPauseOnStart } = internalBinding('inspector');
result = callAndPauseOnStart(compiledWrapper, thisValue, exports,

View File

@@ -7,10 +7,10 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were
a real filesystem.
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index f5c0208864084a234a05898e793845681b6e80cc..48d809f61eaf09097acb3e996e956e39cf7b4ef3 100644
index 4fd535f730e6382672b853bf2098b3fefc1f83b4..bd6724de52ee1f01fa42084c7652c71054f0a9c6 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -134,6 +134,10 @@ process.domain = null;
@@ -132,6 +132,10 @@ process.domain = null;
}
process._exiting = false;

View File

@@ -18,7 +18,7 @@ This can be removed when Node.js upgrades to a version of V8 containing CLs
from the above issue.
diff --git a/src/api/environment.cc b/src/api/environment.cc
index 9b155213ce301df7e396a4a113992499fc7e9910..8fe560014216f1fcea7f6e804816765999cebaa2 100644
index 7f4f233b26425493a58ce71dfc0c3a92b7c0bef8..c3f422c6b212bf737a906d2a89df85b63c218617 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -312,6 +312,10 @@ Isolate* NewIsolate(Isolate::CreateParams* params,
@@ -47,10 +47,10 @@ index 9b155213ce301df7e396a4a113992499fc7e9910..8fe560014216f1fcea7f6e8048167659
event_loop,
platform,
diff --git a/src/env.cc b/src/env.cc
index 1c1062a3996f2bb7de9e91f7f4385c8f8d20f490..b0156ee26c29ebe5b79c97834f3bfe8b56df50c6 100644
index ddf82c8a18c29c355641e33974c1e5e67867379d..ae43803d8c2de90fb191a8e10605f6f3b18816ed 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -575,14 +575,6 @@ IsolateData::IsolateData(Isolate* isolate,
@@ -577,14 +577,6 @@ IsolateData::IsolateData(Isolate* isolate,
// We do not care about overflow since we just want this to be different
// from the cppgc id.
uint16_t non_cppgc_id = cppgc_id + 1;
@@ -65,12 +65,13 @@ index 1c1062a3996f2bb7de9e91f7f4385c8f8d20f490..b0156ee26c29ebe5b79c97834f3bfe8b
{
// GC could still be run after the IsolateData is destroyed, so we store
// the ids in a static map to ensure pointers to them are still valid
@@ -605,14 +597,6 @@ IsolateData::IsolateData(Isolate* isolate,
@@ -607,15 +599,6 @@ IsolateData::IsolateData(Isolate* isolate,
}
}
-IsolateData::~IsolateData() {
- if (cpp_heap_ != nullptr) {
- v8::Locker locker(isolate_);
- // The CppHeap must be detached before being terminated.
- isolate_->DetachCppHeap();
- cpp_heap_->Terminate();
@@ -81,7 +82,7 @@ index 1c1062a3996f2bb7de9e91f7f4385c8f8d20f490..b0156ee26c29ebe5b79c97834f3bfe8b
void SetCppgcReference(Isolate* isolate,
Local<Object> object,
diff --git a/src/env.h b/src/env.h
index 1f8dc8f88d40ca95ba13d6517b2b5ed83184e1ce..ec3a813b3b864a0eda2e4aa0748b1447001fca9a 100644
index 9f1c7ef45b6df10f811936a78ea6d9fcc13fef4f..c429eecd937d1df32a2ff90bc0a22a2e58df3a3d 100644
--- a/src/env.h
+++ b/src/env.h
@@ -155,7 +155,6 @@ class NODE_EXTERN_PRIVATE IsolateData : public MemoryRetainer {
@@ -101,7 +102,7 @@ index 1f8dc8f88d40ca95ba13d6517b2b5ed83184e1ce..ec3a813b3b864a0eda2e4aa0748b1447
worker::Worker* worker_context_ = nullptr;
PerIsolateWrapperData* wrapper_data_;
diff --git a/src/node.cc b/src/node.cc
index b2b10ffb572f010992f221de752618fd56b5d50e..0ed78ab6b52906e980eebf1f625a1c7cbfc8097b 100644
index 8da5f5344051663f92d72848fbac9d041ac4fac3..2f58a6fa69069dabb99b5ddb8011991b07fa5f02 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -1222,10 +1222,6 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
@@ -263,10 +264,10 @@ index edd413ae9b956b2e59e8166785adef6a8ff06d51..d1c1549efcb0320bc0f7d354db2101ac
// Check that all the objects are created and destroyed properly.
EXPECT_EQ(CppGCed::kConstructCount, 100);
diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc
index 14e82cc80ff73084fb43b2ef07febfd2667a0abc..b6a92f1685d1083c8f0c0b3ed110509f6d76b59f 100644
index 008cda77b650dc2d904ae00e7629b5ad05d297ad..103931516cea9beb7f25c53526928e67b3c90d2d 100644
--- a/test/cctest/test_environment.cc
+++ b/test/cctest/test_environment.cc
@@ -623,6 +623,9 @@ TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) {
@@ -625,6 +625,9 @@ TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) {
// Allocate and initialize Isolate.
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = allocator.get();
@@ -276,7 +277,7 @@ index 14e82cc80ff73084fb43b2ef07febfd2667a0abc..b6a92f1685d1083c8f0c0b3ed110509f
v8::Isolate* isolate = v8::Isolate::Allocate();
CHECK_NOT_NULL(isolate);
platform->RegisterIsolate(isolate, &current_loop);
@@ -672,8 +675,8 @@ TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) {
@@ -675,8 +678,8 @@ TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) {
}
// Cleanup.
@@ -287,10 +288,10 @@ index 14e82cc80ff73084fb43b2ef07febfd2667a0abc..b6a92f1685d1083c8f0c0b3ed110509f
#endif // _WIN32
diff --git a/test/cctest/test_platform.cc b/test/cctest/test_platform.cc
index c2d7893813000601502d050f21ad5c740c6a3b8f..3042f63201bd0df3ad316e09f0f54e210cea8831 100644
index 53644accf29749bf8fc18b641ae1eaef93cd6f98..7e5b143fb4b633e18a4b2d7440cba7e077c50950 100644
--- a/test/cctest/test_platform.cc
+++ b/test/cctest/test_platform.cc
@@ -101,8 +101,8 @@ TEST_F(NodeZeroIsolateTestFixture, IsolatePlatformDelegateTest) {
@@ -102,8 +102,8 @@ TEST_F(NodeZeroIsolateTestFixture, IsolatePlatformDelegateTest) {
// Graceful shutdown
delegate->Shutdown();

View File

@@ -16,7 +16,7 @@ patch:
(cherry picked from commit 30329d06235a9f9733b1d4da479b403462d1b326)
diff --git a/src/env-inl.h b/src/env-inl.h
index 49c3513ee9b67b407a2bb6609ac89a5959a78cd1..9a8216354e646e86d692b25c2bed5134e267528c 100644
index d4b211dfb2f77a65f311701d95365e66d92f8875..4c1a5f2b92d7fdddb8c2e7bbfd6788fdff3645b9 100644
--- a/src/env-inl.h
+++ b/src/env-inl.h
@@ -62,31 +62,6 @@ inline uv_loop_t* IsolateData::event_loop() const {
@@ -52,7 +52,7 @@ index 49c3513ee9b67b407a2bb6609ac89a5959a78cd1..9a8216354e646e86d692b25c2bed5134
return &(wrapper_data_->cppgc_id);
}
diff --git a/src/env.cc b/src/env.cc
index b428c922ed218cbdf19cdba50d18b1f81a56b8ca..1c1062a3996f2bb7de9e91f7f4385c8f8d20f490 100644
index f8c24e422756d5101a258175a2f28a96648bea47..ddf82c8a18c29c355641e33974c1e5e67867379d 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -23,6 +23,7 @@
@@ -63,7 +63,7 @@ index b428c922ed218cbdf19cdba50d18b1f81a56b8ca..1c1062a3996f2bb7de9e91f7f4385c8f
#include <algorithm>
#include <atomic>
@@ -70,7 +71,6 @@ using v8::TryCatch;
@@ -72,7 +73,6 @@ using v8::TryCatch;
using v8::Uint32;
using v8::Undefined;
using v8::Value;
@@ -71,7 +71,7 @@ index b428c922ed218cbdf19cdba50d18b1f81a56b8ca..1c1062a3996f2bb7de9e91f7f4385c8f
using worker::Worker;
int const ContextEmbedderTag::kNodeContextTag = 0x6e6f64;
@@ -527,6 +527,14 @@ void IsolateData::CreateProperties() {
@@ -529,6 +529,14 @@ void IsolateData::CreateProperties() {
CreateEnvProxyTemplate(this);
}
@@ -86,7 +86,7 @@ index b428c922ed218cbdf19cdba50d18b1f81a56b8ca..1c1062a3996f2bb7de9e91f7f4385c8f
constexpr uint16_t kDefaultCppGCEmbedderID = 0x90de;
Mutex IsolateData::isolate_data_mutex_;
std::unordered_map<uint16_t, std::unique_ptr<PerIsolateWrapperData>>
@@ -564,36 +572,16 @@ IsolateData::IsolateData(Isolate* isolate,
@@ -566,36 +574,16 @@ IsolateData::IsolateData(Isolate* isolate,
v8::CppHeap* cpp_heap = isolate->GetCppHeap();
uint16_t cppgc_id = kDefaultCppGCEmbedderID;
@@ -130,7 +130,7 @@ index b428c922ed218cbdf19cdba50d18b1f81a56b8ca..1c1062a3996f2bb7de9e91f7f4385c8f
{
// GC could still be run after the IsolateData is destroyed, so we store
@@ -625,11 +613,12 @@ IsolateData::~IsolateData() {
@@ -628,11 +616,12 @@ IsolateData::~IsolateData() {
}
}
@@ -146,7 +146,7 @@ index b428c922ed218cbdf19cdba50d18b1f81a56b8ca..1c1062a3996f2bb7de9e91f7f4385c8f
void IsolateData::MemoryInfo(MemoryTracker* tracker) const {
diff --git a/src/env.h b/src/env.h
index aed066852d7c257076cc7ca8b173fd2a3a353a00..1f8dc8f88d40ca95ba13d6517b2b5ed83184e1ce 100644
index cfe917c797a6e4bb0f0284ec56be82637f840129..9f1c7ef45b6df10f811936a78ea6d9fcc13fef4f 100644
--- a/src/env.h
+++ b/src/env.h
@@ -175,10 +175,6 @@ class NODE_EXTERN_PRIVATE IsolateData : public MemoryRetainer {
@@ -161,10 +161,10 @@ index aed066852d7c257076cc7ca8b173fd2a3a353a00..1f8dc8f88d40ca95ba13d6517b2b5ed8
inline MultiIsolatePlatform* platform() const;
inline const SnapshotData* snapshot_data() const;
diff --git a/src/node.h b/src/node.h
index 120e3a1042e29590cbbf4be258a1cd2d3d4f0043..afb26ec5690ccd65a3c36f8b8a1b2de416b9d843 100644
index bdc77f8eb7abffa9e6c98cd254daedad3e44b981..98ad0ea649eaef43d1f5231f7bc4044e100e08d7 100644
--- a/src/node.h
+++ b/src/node.h
@@ -1552,24 +1552,14 @@ void RegisterSignalHandler(int signal,
@@ -1553,24 +1553,14 @@ void RegisterSignalHandler(int signal,
bool reset_handler = false);
#endif // _WIN32

View File

@@ -40,10 +40,10 @@ index 0f0cde7be431dcb80c5314b1a9da49886c436d1c..f6d2bd439cad8b9f91c9d9a6cdb302e6
}
HistogramBase* histogram;
diff --git a/src/node_file.cc b/src/node_file.cc
index 3d7e303741a73134e140152bed637fe5ae8bc1db..5e744bc34b9dc364e8f20adfd37ee41d76451170 100644
index c7915e2c8161a5d0fa05ccce368ce9c44345c05d..23347379328794467a497c86cbae0b428b7ba791 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -1061,13 +1061,8 @@ static int32_t FastInternalModuleStat(
@@ -1071,13 +1071,8 @@ static int32_t FastInternalModuleStat(
// NOLINTNEXTLINE(runtime/references) This is V8 api.
FastApiCallbackOptions& options) {
// This needs a HandleScope which needs an isolate.
@@ -60,10 +60,10 @@ index 3d7e303741a73134e140152bed637fe5ae8bc1db..5e744bc34b9dc364e8f20adfd37ee41d
auto path = std::filesystem::path(input.data, input.data + input.length);
diff --git a/src/node_wasi.cc b/src/node_wasi.cc
index 468c2e59903fefe58d9c178d3afac3ef5b09f611..23a376e52e08a8af49dd47c47488552e01287426 100644
index 090866960beb8f1759c99e95536924b8b61fb723..3f91b651b83a20e70d5b368e012f5ee4b9d16092 100644
--- a/src/node_wasi.cc
+++ b/src/node_wasi.cc
@@ -251,17 +251,19 @@ R WASI::WasiFunction<FT, F, R, Args...>::FastCallback(
@@ -275,17 +275,19 @@ R WASI::WasiFunction<FT, F, R, Args...>::FastCallback(
return EinvalError<R>();
}

View File

@@ -7,7 +7,7 @@ This refactors several allocators to allocate within the V8 memory cage,
allowing them to be compatible with the V8_SANDBOXED_POINTERS feature.
diff --git a/src/api/environment.cc b/src/api/environment.cc
index ad323fc800a33c010b0504a4aa55c107498dee26..fc9b056d2f7e25109100fbde5f3ab0aebc8c619a 100644
index 88c2c932a6b045317c83c911b1cd8267b60d9334..7f4f233b26425493a58ce71dfc0c3a92b7c0bef8 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -102,6 +102,14 @@ MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context,
@@ -64,10 +64,10 @@ index 5387d9625a28bb7d11f7f0f05a5f07d1fee2c216..1b3b8c7b70073926f8dbf02759c2e1af
return Buffer::New(env, ab, 0, ab->ByteLength()).FromMaybe(Local<Value>());
}
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
index 25fa9af8153852f49d5289aa253f3c8f7268d89c..a67268f78b18cf71b90b9e31ad733eb0c8d93af3 100644
index 6346f8f7199cf7b7d3736c59571606fff102fbb6..7eea2eaefcad5780663a6b87985925ae5d70a5f9 100644
--- a/src/crypto/crypto_util.cc
+++ b/src/crypto/crypto_util.cc
@@ -335,10 +335,35 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept {
@@ -359,10 +359,35 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept {
return *this;
}
@@ -104,7 +104,7 @@ index 25fa9af8153852f49d5289aa253f3c8f7268d89c..a67268f78b18cf71b90b9e31ad733eb0
std::unique_ptr<BackingStore> ptr = ArrayBuffer::NewBackingStore(
allocated_data_,
size(),
@@ -350,10 +375,11 @@ std::unique_ptr<BackingStore> ByteSource::ReleaseToBackingStore() {
@@ -374,10 +399,11 @@ std::unique_ptr<BackingStore> ByteSource::ReleaseToBackingStore() {
data_ = nullptr;
size_ = 0;
return ptr;
@@ -117,7 +117,7 @@ index 25fa9af8153852f49d5289aa253f3c8f7268d89c..a67268f78b18cf71b90b9e31ad733eb0
return ArrayBuffer::New(env->isolate(), std::move(store));
}
@@ -650,6 +676,16 @@ namespace {
@@ -674,6 +700,16 @@ namespace {
// in which case this has the same semantics as
// using OPENSSL_malloc. However, if the secure heap is
// initialized, SecureBuffer will automatically use it.
@@ -134,7 +134,7 @@ index 25fa9af8153852f49d5289aa253f3c8f7268d89c..a67268f78b18cf71b90b9e31ad733eb0
void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsUint32());
Environment* env = Environment::GetCurrent(args);
@@ -671,6 +707,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -695,6 +731,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);
args.GetReturnValue().Set(Uint8Array::New(buffer, 0, len));
}
@@ -143,10 +143,10 @@ index 25fa9af8153852f49d5289aa253f3c8f7268d89c..a67268f78b18cf71b90b9e31ad733eb0
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
#ifndef OPENSSL_IS_BORINGSSL
diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h
index a5967c7d24b8365eb64ab63ec0b3ef8dc23c727e..2acebc3ac2ed9f631fc572f42f19f2e3dccfeb12 100644
index b85c8daeb464097c2e93bdc7ffdfcfe16b76234b..470a0c4adadcd092dd0105c384e87917ac6fe69a 100644
--- a/src/crypto/crypto_util.h
+++ b/src/crypto/crypto_util.h
@@ -241,7 +241,7 @@ class ByteSource {
@@ -242,7 +242,7 @@ class ByteSource {
// Creates a v8::BackingStore that takes over responsibility for
// any allocated data. The ByteSource will be reset with size = 0
// after being called.
@@ -189,7 +189,7 @@ index 3465454e4de4a78912b81e7eca0de395fbe89911..c8ae863460107c69dd77d67c76c11843
Local<Value> ret;
if (!Buffer::New(env, ab, 0, ab->ByteLength()).ToLocal(&ret)) return {};
diff --git a/src/node_i18n.cc b/src/node_i18n.cc
index 0bcf10a0b35accb8d6d5fe9891d4f52b27d40346..606c2021242e6967ea4195af3e2493a7d5745dae 100644
index ea7810e41e2667713a896250dc1b904b0a7cf198..865b3128c1edfe7074769f25a0b87878ca094f31 100644
--- a/src/node_i18n.cc
+++ b/src/node_i18n.cc
@@ -104,7 +104,7 @@ namespace {
@@ -253,7 +253,7 @@ index 382df89a2312f76b5293412a8d51969ae5d9fa9c..1c90da9bbcb9547ab36de4d01088c03f
// Delegate to V8's allocator for compatibility with the V8 memory cage.
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..6552af3ed0acede41c1b16ef77eb359dc54f088a 100644
index c55a2e28066147ae5ca5def10ec76ccc03c634b4..c54183c72944989219b6437c9e571a3f7f3f8dd5 100644
--- a/src/node_serdes.cc
+++ b/src/node_serdes.cc
@@ -29,6 +29,26 @@ using v8::ValueSerializer;

View File

@@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Mon, 5 May 2025 13:04:14 +0000
Subject: test: force slow JSON.stringify path for overflow
Refs https://chromium-review.googlesource.com/c/v8/v8/+/6011806
The V8 team just enabled the JSON.stringify fast path by default,
which is iterative and won't throw. Pre-emptively preserve test
functionality by forcing the slow path. See above linked PR for
approach this is borrowed from.
Upstreamed in https://github.com/nodejs/node/pull/58181.
diff --git a/test/fixtures/console/stack_overflow.js b/test/fixtures/console/stack_overflow.js
index 565692b6d6e4ba4c439a38250407004c5aa21df9..14bceef878b5cf27609b29c8cc7852cab4dd63ff 100644
--- a/test/fixtures/console/stack_overflow.js
+++ b/test/fixtures/console/stack_overflow.js
@@ -26,11 +26,15 @@ Error.stackTraceLimit = 0;
console.error('before');
+// Invalidate elements protector to force slow-path.
+// The fast-path of JSON.stringify is iterative and won't throw.
+Array.prototype[2] = 'foo';
+
// Trigger stack overflow by stringifying a deeply nested array.
-let array = [];
-for (let i = 0; i < 100000; i++) {
- array = [ array ];
-}
+// eslint-disable-next-line no-sparse-arrays
+let array = [,];
+for (let i = 0; i < 10000; i++)
+ array = [array];
JSON.stringify(array);

View File

@@ -7,7 +7,7 @@ Instead of disabling the tests, flag them as flaky so they still run
but don't cause CI failures on flakes.
diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status
index fd42444c7b216a4a1fa026efc1bbc1b5df8c7394..26f78764842aaaa781a9409dda2a7d3265351178 100644
index cc99efd7a743d683d5210ad83e258560c28cbd16..b2f0f7fb49665f0dc924cdd3e344c2579d617fbf 100644
--- a/test/parallel/parallel.status
+++ b/test/parallel/parallel.status
@@ -5,6 +5,16 @@ prefix parallel

View File

@@ -1,83 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 12 Feb 2025 21:01:13 +0100
Subject: test: make eval snapshot tests more flexible
Upstreamed in X
diff --git a/test/fixtures/eval/eval_messages.snapshot b/test/fixtures/eval/eval_messages.snapshot
index f6fc803e0e3ec3f6a0c7cd056f42ac860012c907..998a06584b3bf3648e6703774aeb31c07bdb5d0e 100644
--- a/test/fixtures/eval/eval_messages.snapshot
+++ b/test/fixtures/eval/eval_messages.snapshot
@@ -35,7 +35,7 @@ Node.js *
var ______________________________________________; throw 10
^
10
-(Use `node --trace-uncaught ...` to show where the exception was thrown)
+(Use `* --trace-uncaught ...` to show where the exception was thrown)
Node.js *
@@ -43,7 +43,7 @@ Node.js *
var ______________________________________________; throw 10
^
10
-(Use `node --trace-uncaught ...` to show where the exception was thrown)
+(Use `* --trace-uncaught ...` to show where the exception was thrown)
Node.js *
done
diff --git a/test/fixtures/eval/stdin_messages.snapshot b/test/fixtures/eval/stdin_messages.snapshot
index 66bd506f758ca93906f850a9c773b617745eb834..0382a6ae3ccd792523cc19847bbdeef4d53e1579 100644
--- a/test/fixtures/eval/stdin_messages.snapshot
+++ b/test/fixtures/eval/stdin_messages.snapshot
@@ -40,7 +40,7 @@ Node.js *
let ______________________________________________; throw 10
^
10
-(Use `node --trace-uncaught ...` to show where the exception was thrown)
+(Use `* --trace-uncaught ...` to show where the exception was thrown)
Node.js *
@@ -48,7 +48,7 @@ Node.js *
let ______________________________________________; throw 10
^
10
-(Use `node --trace-uncaught ...` to show where the exception was thrown)
+(Use `* --trace-uncaught ...` to show where the exception was thrown)
Node.js *
done
diff --git a/test/parallel/test-node-output-eval.mjs b/test/parallel/test-node-output-eval.mjs
index d8c52176b1c3c3a0664d7f6b6750da03aa960587..8a3cc59574206769e4c80a04f05b03586f511ac2 100644
--- a/test/parallel/test-node-output-eval.mjs
+++ b/test/parallel/test-node-output-eval.mjs
@@ -1,6 +1,7 @@
import '../common/index.mjs';
import * as fixtures from '../common/fixtures.mjs';
import * as snapshot from '../common/assertSnapshot.js';
+import { basename } from 'node:path';
import { describe, it } from 'node:test';
describe('eval output', { concurrency: true }, () => {
@@ -16,6 +17,7 @@ describe('eval output', { concurrency: true }, () => {
snapshot.replaceNodeVersion,
removeStackTraces,
filterEmptyLines,
+ generalizeProcessName,
);
function removeStackTraces(output) {
@@ -26,6 +28,11 @@ describe('eval output', { concurrency: true }, () => {
return output.replaceAll(/^\s*$/gm, '');
}
+ function generalizeProcessName(output) {
+ const baseName = basename(process.argv0 || 'node', '.exe');
+ return output.replaceAll(`${baseName} --`, '* --');
+ }
+
const tests = [
{ name: 'eval/eval_messages.js' },
{ name: 'eval/stdin_messages.js' },

View File

@@ -16,10 +16,10 @@ a bus error killing node.
see https://github.com/google/brotli/issues/1159
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 90307cd4984ae5aa55386f2980ad9cd540322dfd..6f12b5034d1a98da50c064cf2cfdf12fc88137eb 100644
index 0b7c47b326c7c5480086228b3d40d54c260ef16a..7e6b38ecd1aa360012c0d73e94412530a48cb8c3 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -493,7 +493,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
@@ -608,7 +608,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
}
static void* AllocForBrotli(void* data, size_t size) {
@@ -29,7 +29,7 @@ index 90307cd4984ae5aa55386f2980ad9cd540322dfd..6f12b5034d1a98da50c064cf2cfdf12f
CompressionStream* ctx = static_cast<CompressionStream*>(data);
char* memory = UncheckedMalloc(size);
if (memory == nullptr) [[unlikely]] {
@@ -502,7 +503,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
@@ -617,7 +618,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
*reinterpret_cast<size_t*>(memory) = size;
ctx->unreported_allocations_.fetch_add(size,
std::memory_order_relaxed);
@@ -38,7 +38,7 @@ index 90307cd4984ae5aa55386f2980ad9cd540322dfd..6f12b5034d1a98da50c064cf2cfdf12f
}
static void FreeForZlib(void* data, void* pointer) {
@@ -510,7 +511,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
@@ -625,7 +626,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
return;
}
CompressionStream* ctx = static_cast<CompressionStream*>(data);

View File

@@ -30,6 +30,7 @@
"parallel/test-http2-https-fallback",
"parallel/test-http2-server-unknown-protocol",
"parallel/test-https-agent-session-reuse",
"parallel/test-https-client-renegotiation-limit",
"parallel/test-https-options-boolean-check",
"parallel/test-icu-env",
"parallel/test-icu-minimum-version",

View File

@@ -362,8 +362,7 @@ void BaseWindow::SetContentView(gin::Handle<View> view) {
}
void BaseWindow::CloseImmediately() {
if (!window_->IsClosed())
window_->CloseImmediately();
window_->CloseImmediately();
}
void BaseWindow::Close() {

View File

@@ -3961,8 +3961,7 @@ bool WebContents::IsFullscreenForTabOrPending(
if (!owner_window())
return is_html_fullscreen();
bool in_transition = owner_window()->fullscreen_transition_state() !=
NativeWindow::FullScreenTransitionState::kNone;
const bool in_transition = owner_window()->is_transitioning_fullscreen();
bool is_html_transition = owner_window()->fullscreen_transition_type() ==
NativeWindow::FullScreenTransitionType::kHTML;

View File

@@ -99,12 +99,11 @@ void WebContentsView::WebContentsDestroyed() {
void WebContentsView::OnViewAddedToWidget(views::View* observed_view) {
DCHECK_EQ(observed_view, view());
views::Widget* widget = view()->GetWidget();
auto* native_window =
static_cast<NativeWindow*>(widget->GetNativeWindowProperty(
electron::kElectronNativeWindowKey.c_str()));
NativeWindow* native_window = NativeWindow::FromWidget(view()->GetWidget());
if (!native_window)
return;
// We don't need to call SetOwnerWindow(nullptr) in OnViewRemovedFromWidget
// because that's handled in the WebContents dtor called prior.
api_web_contents_->SetOwnerWindow(native_window);
@@ -114,11 +113,11 @@ void WebContentsView::OnViewAddedToWidget(views::View* observed_view) {
void WebContentsView::OnViewRemovedFromWidget(views::View* observed_view) {
DCHECK_EQ(observed_view, view());
views::Widget* widget = view()->GetWidget();
auto* native_window = static_cast<NativeWindow*>(
widget->GetNativeWindowProperty(kElectronNativeWindowKey.c_str()));
NativeWindow* native_window = NativeWindow::FromWidget(view()->GetWidget());
if (!native_window)
return;
native_window->RemoveDraggableRegionProvider(this);
}

View File

@@ -36,6 +36,7 @@
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/login_delegate.h"
#include "content/public/browser/navigation_throttle_registry.h"
#include "content/public/browser/overlay_window.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
@@ -954,8 +955,10 @@ bool ElectronBrowserClient::HandleExternalProtocol(
std::vector<std::unique_ptr<content::NavigationThrottle>>
ElectronBrowserClient::CreateThrottlesForNavigation(
content::NavigationHandle* handle) {
content::NavigationThrottleRegistry& registry) {
std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
content::NavigationHandle* handle = &registry.GetNavigationHandle();
throttles.push_back(std::make_unique<ElectronNavigationThrottle>(handle));
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)

View File

@@ -31,6 +31,7 @@ class FilePath;
namespace content {
class ClientCertificateDelegate;
class PlatformNotificationService;
class NavigationThrottleRegistry;
class QuotaPermissionContext;
} // namespace content
@@ -76,7 +77,8 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
// content::NavigatorDelegate
std::vector<std::unique_ptr<content::NavigationThrottle>>
CreateThrottlesForNavigation(content::NavigationHandle* handle) override;
CreateThrottlesForNavigation(
content::NavigationThrottleRegistry& registry) override;
// content::ContentBrowserClient:
std::string GetApplicationLocale() override;

View File

@@ -19,6 +19,7 @@
#include "printing/buildflags/buildflags.h"
#include "services/network/public/cpp/features.h"
#include "third_party/blink/public/common/features.h"
#include "ui/accessibility/ax_features.mojom-features.h"
#if BUILDFLAG(IS_MAC)
#include "device/base/features.h" // nogncheck
@@ -49,7 +50,10 @@ void InitializeFeatureList() {
// Can be reenabled when our site instance policy is aligned with chromium
// when node integration is enabled.
disable_features +=
std::string(",") + features::kSpareRendererForSitePerProcess.name;
std::string(",") + features::kSpareRendererForSitePerProcess.name +
// See https://chromium-review.googlesource.com/c/chromium/src/+/6487926
// this breaks PDFs locally as we don't have GLIC infra enabled.
std::string(",") + ax::mojom::features::kScreenAIOCREnabled.name;
#if BUILDFLAG(IS_WIN)
disable_features +=

View File

@@ -284,8 +284,11 @@ void NativeWindow::InitFromOptions(const gin_helper::Dictionary& options) {
Show();
}
bool NativeWindow::IsClosed() const {
return is_closed_;
// static
NativeWindow* NativeWindow::FromWidget(const views::Widget* widget) {
DCHECK(widget);
return static_cast<NativeWindow*>(
widget->GetNativeWindowProperty(kNativeWindowKey.c_str()));
}
void NativeWindow::SetSize(const gfx::Size& size, bool animate) {
@@ -525,8 +528,23 @@ void NativeWindow::NotifyWindowCloseButtonClicked() {
CloseImmediately();
}
void NativeWindow::Close() {
if (!IsClosable()) {
WindowList::WindowCloseCancelled(this);
return;
}
if (!is_closed())
CloseImpl();
}
void NativeWindow::CloseImmediately() {
if (!is_closed())
CloseImmediatelyImpl();
}
void NativeWindow::NotifyWindowClosed() {
if (is_closed_)
if (is_closed())
return;
is_closed_ = true;
@@ -812,17 +830,14 @@ bool NativeWindow::IsTranslucent() const {
#if BUILDFLAG(IS_MAC)
// Windows with vibrancy set are translucent
if (!vibrancy().empty()) {
if (!vibrancy_.empty())
return true;
}
#endif
#if BUILDFLAG(IS_WIN)
// Windows with certain background materials may be translucent
const std::string& bg_material = background_material();
if (!bg_material.empty() && bg_material != "none") {
if (!background_material_.empty() && background_material_ != "none")
return true;
}
#endif
return false;

Some files were not shown because too many files have changed in this diff Show More