Compare commits

...

21 Commits

Author SHA1 Message Date
Shelley Vohr
cdfc47e0b9 build: remove render_widget_host_view_base patch 2025-05-06 14:29:14 +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
Yuri
7153008bfa docs: clarified usage of createFromPath() (#46809)
* docs: clarified usage of createFromPath()

* Update docs/api/native-image.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-05-02 11:11:54 +02:00
Charles Kerr
f6b297a06a refactor: use base::ObserverList::Notify() (#46875)
* refactor: use ObserverList::Notify() in shell/browser/window_list.cc

* refactor: use ObserverList::Notify() in shell/browser/web_contents_zoom_controller.cc

* refactor: use ObserverList::Notify() in shell/browser/usb/usb_chooser_context.cc

* refactor: use ObserverList::Notify() in shell/browser/usb/electron_usb_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/ui/views/menu_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/ui/tray_icon.cc

* refactor: use ObserverList::Notify() in shell/browser/ui/electron_menu_model.cc

* refactor: use ObserverList::Notify() in shell/browser/serial/serial_chooser_context.cc

* refactor: use ObserverList::Notify() in shell/browser/native_window.cc

* refactor: use ObserverList::Notify() in shell/browser/serial/electron_serial_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/browser.cc

* refactor: use ObserverList::Notify() in shell/browser/api/electron_api_web_contents.cc

* refactor: use ObserverList::Notify() in shell/browser/hid/electron_hid_delegate.cc

* refactor: use ObserverList::Notify() in shell/browser/hid/hid_chooser_context.cc
2025-05-02 11:10:52 +02:00
Shelley Vohr
ede84fc327 feat: support dip <-> screen conversion on Linux X11 (#46211)
feat: support dip <-> screen conversion on Linux
2025-05-02 10:31:45 +02:00
electron-roller[bot]
2b07e6450c chore: bump chromium to 138.0.7154.0 (main) (#46872)
* chore: bump chromium in DEPS to 138.0.7152.0

* chore: update patches

* chore: bump chromium in DEPS to 138.0.7154.0

* chore: update patches

* ozone/wayland: Fix bookmark dropdown right click context menu

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

* Use base::cstring_view in base::Environment

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

* [A11yPerformance] Remove Add/Remove AXMode methods

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

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

* build: update filenames.libcxx.gni

* Use base::cstring_view in base::Environment

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

* Use getters to expose NativePixmapHandle from GpuMemoryBufferHandle

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-01 23:53:40 -05:00
Keeley Hammond
63114e2b8e fix: revert macOS content protection logic refactor (#46886)
Revert "refactor: use upstream content protection logic on macOS (#46813)"

This reverts commit 34adb976b6.
2025-05-01 13:49:55 -07:00
Charles Kerr
df4564dc39 refactor: don't call deprecated WidgetDelegate API in NativeWindowViews (#46858)
* refactor: don't call RegisterDeleteDelegateCallback()

move NativeWindowViews' on-widget-delegate-destroyed callback logic to
the NativeWindowViews destructor.

Since NativeWindowViews subclasses from WidgetDelegate and |this| *is*
the delegate being destroyed, we can handle this more cleanly in
~NativeWindowViews() instead of in a separate callback.

* chore: remove NativeWindowViews from the grandfathered-classes-that-can-call-deprecated-views-behavior patch

* refactor: don't call RegisterDeleteDelegateCallback()

RegisterDeleteDelegateCallback() is private upstream API, so we
shouldn't be using it.

Move the on-widget-delegate-destroyed callback logic over to our methods
NativeWindowViews::OnWidgetDestroying() and
NativeWindowViews::OnWidgetDestroyed().
2025-05-01 12:07:20 -05:00
David Sanders
4f89c31956 refactor: add EmitDeprecationWarning helper (#46860)
* refactor: add EmitDeprecationWarning helper

Also switches EmitWarning to using Node's ProcessEmitWarningGeneric

* chore: use node namespace for function call
2025-04-30 13:48:35 -05:00
Charles Kerr
25d77fd1ce refactor: use WidgetDelegate's title property (#46849)
* refactor: use WidgetDelegate::SetTitle()

* Make NativeWindow::SetTitle() and NativeWindow::GetTitle() non-virtual.
  Use WidgetDelegate for their implementation.

* Add NativeWindow::OnTitleChanged(), a new protected virtual method to update
  subclasses (e.g. NativeWindowMac needs to redraw the button proxy).

* In NativeWindowMac, replace SetTitle() and GetTitle() with OnTitleChanged().

* In NativeWindowViews, replace SetTitle() and GetTitle() with OnTitleChanged().

* test: enable BrowserWindow.title tests on Linux

* test: add a test to confirm win.title changes when document.title is set in the renderer
2025-04-30 08:22:27 -07:00
163 changed files with 1407 additions and 2207 deletions

View File

@@ -670,6 +670,8 @@ source_set("electron_lib") {
sources += [
"shell/browser/certificate_manager_model.cc",
"shell/browser/certificate_manager_model.h",
"shell/browser/linux/x11_util.cc",
"shell/browser/linux/x11_util.h",
"shell/browser/ui/gtk_util.cc",
"shell/browser/ui/gtk_util.h",
]

4
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'137.0.7151.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

@@ -356,7 +356,7 @@ as `-webkit-app-region: drag` in a frameless window.
Calling `event.preventDefault()` will prevent the menu from being displayed.
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows-linux).
### Static Methods

View File

@@ -435,7 +435,7 @@ as `-webkit-app-region: drag` in a frameless window.
Calling `event.preventDefault()` will prevent the menu from being displayed.
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows-linux).
### Static Methods

View File

@@ -142,8 +142,8 @@ Note: The Windows implementation will ignore `size.height` and scale the height
Returns `NativeImage`
Creates a new `NativeImage` instance from a file located at `path`. This method
returns an empty image if the `path` does not exist, cannot be read, or is not
Creates a new `NativeImage` instance from an image file (e.g., PNG or JPEG) located at `path`.
This method returns an empty image if the `path` does not exist, cannot be read, or is not
a valid image.
```js

View File

@@ -124,7 +124,7 @@ Returns [`Display`](structures/display.md) - The display nearest the specified p
Returns [`Display`](structures/display.md) - The display that most closely
intersects the provided bounds.
### `screen.screenToDipPoint(point)` _Windows_
### `screen.screenToDipPoint(point)` _Windows_ _Linux_
* `point` [Point](structures/point.md)
@@ -133,7 +133,10 @@ Returns [`Point`](structures/point.md)
Converts a screen physical point to a screen DIP point.
The DPI scale is performed relative to the display containing the physical point.
### `screen.dipToScreenPoint(point)` _Windows_
Not currently supported on Wayland - if used there it will return the point passed
in with no changes.
### `screen.dipToScreenPoint(point)` _Windows_ _Linux_
* `point` [Point](structures/point.md)
@@ -142,6 +145,8 @@ Returns [`Point`](structures/point.md)
Converts a screen DIP point to a screen physical point.
The DPI scale is performed relative to the display containing the DIP point.
Not currently supported on Wayland.
### `screen.screenToDipRect(window, rect)` _Windows_
* `window` [BrowserWindow](browser-window.md) | null

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

@@ -1421,7 +1421,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/is_member_pointer.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_assignable.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_constructible.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_convertible.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_destructible.h",
"//third_party/libc++/src/include/__type_traits/is_null_pointer.h",
"//third_party/libc++/src/include/__type_traits/is_object.h",

View File

@@ -4,7 +4,6 @@ blink_local_frame.patch
can_create_window.patch
disable_hidden.patch
dom_storage_limits.patch
render_widget_host_view_base.patch
render_widget_host_view_mac.patch
webview_cross_drag.patch
gin_enable_disable_v8_platform.patch
@@ -144,6 +143,5 @@ feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch
fix_win32_synchronous_spellcheck.patch
fix_enable_wrap_iter_in_string_view_and_array.patch
fix_linter_error.patch
revert_enable_crel_for_arm32_targets.patch
chore_grandfather_in_electron_views_and_delegates.patch
refactor_patch_electron_permissiontypes_into_blink.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 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index f78e6732f4a154b6a479bcfcdb237f0679a7fde3..c95b699fe2d37421ae589a14d51c5ffd4465860f 100644
index cadb96febde3fb3fe90929873b1db452a6d8fb8f..09f5504127b5a5ec3d0d69d9eb6d0cd93e0e75cd 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -254,6 +254,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -24,7 +24,7 @@ index f78e6732f4a154b6a479bcfcdb237f0679a7fde3..c95b699fe2d37421ae589a14d51c5ffd
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -364,7 +368,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -363,7 +367,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;

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 e3f9f9406f51d4d4cb48fd35d33ee3d694933038..6bcbbd6f746e00344e78447ebdaf59edc80a2b79 100644
index b0aa018f2f4e6865915516ab6b65fac20d9e6f20..c04a544eb8991bfa718322e6e3a090ef4733a50b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4810,6 +4810,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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4590c16b0 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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/accessibility/platform/ax_platform_node.h"
@@ -167,7 +168,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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
base::Value::Dict target_data;
target_data.Set(kSessionIdField, browser->session_id().id());
@@ -190,7 +191,7 @@ void HandleAccessibilityRequestCallback(
@@ -193,7 +194,7 @@ void HandleAccessibilityRequestCallback(
auto& browser_accessibility_state =
*content::BrowserAccessibilityState::GetInstance();
base::Value::Dict data;
@@ -39,8 +39,8 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
bool web = mode.has_mode(ui::AXMode::kWebContents);
@@ -214,7 +215,7 @@ void HandleAccessibilityRequestCallback(
data.Set(kPDFPrinting, pdf_printing);
@@ -246,7 +247,7 @@ void HandleAccessibilityRequestCallback(
initial_process_mode.has_mode(ui::AXMode::kHTML)));
std::string pref_api_type =
- pref->GetString(prefs::kShownAccessibilityApiType);
@@ -48,7 +48,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
bool pref_api_type_supported = false;
std::vector<ui::AXApiType::Type> supported_api_types =
@@ -282,11 +283,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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
data.Set(kBrowsersField, std::move(browser_list));
std::string json_string;
@@ -762,7 +763,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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
pref->SetString(prefs::kShownAccessibilityApiType, value);
}
}
@@ -816,7 +818,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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
ui::AXApiType::Type api_type =
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
std::string accessibility_contents =
@@ -843,6 +846,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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->session_id().id() == session_id) {
base::Value::Dict result = BuildTargetDescriptor(browser);
@@ -855,6 +859,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -885,6 +889,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
@@ -98,7 +98,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
#endif // !BUILDFLAG(IS_ANDROID)
// No browser with the specified |session_id| was found.
base::Value::Dict result;
@@ -898,11 +903,13 @@ void AccessibilityUIMessageHandler::StopRecording(
@@ -928,11 +933,13 @@ void AccessibilityUIMessageHandler::StopRecording(
}
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@@ -115,7 +115,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
// 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()) {
@@ -972,8 +979,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,7 +33,7 @@ index 4b3f01018a9dea91b46b5917e099f272582991b2..8250f2e447ff19829cfae3f00b3df70b
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index ad39862fdd9a5a4f827f36e6a9778223a638d831..518ab769287525b1977387df56d1f50d1f0778f2 100644
index ae32014a8a25f3b1de7f6087551a87400e1463b5..be77c4e02cc495194ed6b248e56bcb75abe4efce 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4627,7 +4627,7 @@ static_library("browser") {
@@ -46,10 +46,10 @@ index ad39862fdd9a5a4f827f36e6a9778223a638d831..518ab769287525b1977387df56d1f50d
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf9ffcb616 100644
index e08035df314884fab39562cd9ee4960ec5af3cb5..28f0f4d671e16ffff770b43fa5a2e366491d4b30 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7187,9 +7187,12 @@ test("unit_tests") {
@@ -7185,9 +7185,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8155,6 +8158,10 @@ test("unit_tests") {
@@ -8153,6 +8156,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8210,7 +8217,6 @@ test("unit_tests") {
@@ -8208,7 +8215,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
deps += [
"../browser/screen_ai:screen_ai_install_state",

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 ebf407904b9b9bc7f60a9c13a5c39ce64640189d..7b45a0006af60400f5d8ba5b925f971cb5cf393e 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
@@ -9778,6 +9778,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 ebf407904b9b9bc7f60a9c13a5c39ce64640189d..7b45a0006af60400f5d8ba5b925f971c
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8aec4d158 100644
index 77954ceccdfb1e94598d5d7ad747721ab84aa1d7..aec96f969800e2a4d09e644df770d367e48b1b63 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5126,6 +5126,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5132,6 +5132,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
opener);
@@ -37,7 +37,7 @@ index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8
// 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
@@ -5167,12 +5173,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5173,12 +5179,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -66,10 +66,10 @@ 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 9c36ad70531bd8c31158c741ab23763ea00bc068..6909f75fb4cbd0e7b4f3067cda52a5f67dc100de 100644
index 210e5ffc0da31cc0d214e8a3e65f7d8b045fd33e..237b279eeefe5b18402a7dea8d1c00072655ed22 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -821,6 +821,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -823,6 +823,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -79,7 +79,7 @@ index 9c36ad70531bd8c31158c741ab23763ea00bc068..6909f75fb4cbd0e7b4f3067cda52a5f6
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 f1fee091b84aec20f1e15dcc90917e50bb47d1c6..3a7a6dc0a4e75c151379f8488d371439a808f1a9 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 f1fee091b84aec20f1e15dcc90917e50bb47d1c6..3a7a6dc0a4e75c151379f8488d371439
} // namespace network
namespace sandbox {
@@ -1377,6 +1378,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 5af26eef19c2f7ce082af02cff6d8f919c4d245d..e3f9f9406f51d4d4cb48fd35d33ee3d694933038 100644
index 7f33a5452de32f5f4f8a43d0314917f24308d77c..b0aa018f2f4e6865915516ab6b65fac20d9e6f20 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6936,6 +6936,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6938,6 +6938,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -163,10 +163,10 @@ index 5af26eef19c2f7ce082af02cff6d8f919c4d245d..e3f9f9406f51d4d4cb48fd35d33ee3d6
// 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,24 +49,23 @@ 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..0d5c63e7efbe42d5352abdeb594175904af30c41 100644
index 89de188e6a0139a236a824b189f1048613d6f457..c438376c34cac4ec7ac7a03d852685c18b10068e 100644
--- a/ui/views/widget/widget_delegate.h
+++ b/ui/views/widget/widget_delegate.h
@@ -169,6 +169,13 @@ namespace data_controls {
class DesktopDataControlsDialog;
@@ -165,6 +165,12 @@ namespace crostini {
class AppRestartDialog;
}
+namespace electron {
+class AutofillPopupView;
+class DevToolsWindowDelegate;
+class NativeWindowMac;
+class NativeWindowViews;
+}
+
namespace enterprise_connectors {
class ContentAnalysisDialog;
class ContentAnalysisDialogBehaviorBrowserTest;
@@ -371,6 +378,7 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -367,6 +373,7 @@ class VIEWS_EXPORT WidgetDelegate {
class OwnedByWidgetPassKey {
private:
@@ -74,16 +73,15 @@ index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..0d5c63e7efbe42d5352abdeb59417590
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `SetOwnedByWidget()`.
@@ -468,6 +476,8 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -463,6 +470,7 @@ class VIEWS_EXPORT WidgetDelegate {
};
class RegisterDeleteCallbackPassKey {
private:
+ friend class electron::NativeWindowMac;
+ friend class electron::NativeWindowViews;
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `RegisterDeleteDelegateCallback()`.
@@ -918,6 +928,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 4c30f71ced0da645637c989c08ccc93e463e755f..56b2fb93d5d85f520081de9e42e26ef3f8f6090e 100644
index 459fc0eff0bfe2ec005d6f34cf7e91c2d601fd06..35de681eac3f65ce3e0435bd984159154ece2b7f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5045,7 +5045,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

@@ -80,10 +80,10 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d
content::WebContents* source,
const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 435235c067f70f7f3d219dfc0bf91c9be40d1389..cc6c860ec51075fc047a77c26c5b42296bb6ab19 100644
index de3f9f56b47628e1104b5f64b3c17cc35e10bfc7..3a19c28386fd3a0b8755a06510895c685f2c0cdb 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2323,12 +2323,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2327,12 +2327,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -99,10 +99,10 @@ index 435235c067f70f7f3d219dfc0bf91c9be40d1389..cc6c860ec51075fc047a77c26c5b4229
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index c4cea0b6e8c4c95ebcddf5497d731d1d63934f22..7686b75c5504d093dcd9dd8a7ffd28e0c2fd036c 100644
index 0bcb2fc072e47c2c259b724209b4814486329fe1..db674988cf87f198ed1af7e0f4def24776fbaa89 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -1026,8 +1026,7 @@ class Browser : public TabStripModelObserver,
@@ -1027,8 +1027,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -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 7a8d7ce6f628123f5288d693046ca7602eeccac1..f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c 100644
index c1c3db2992038cad0c01ce65c57676f8fe281830..2ad1479de622d956c701d8dc4adb75d0114f65b1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5008,8 +5008,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,
@@ -274,7 +274,7 @@ index 8d6fc67cb9b1d653bce64d1ba22aa7ec2d79257c..d5ce746373a1a4310e1eb530aee011a7
return true;
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.h b/extensions/browser/guest_view/app_view/app_view_guest.h
index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2ce9f6cd53 100644
index 775cfbf5adac0017f343bc091daee1b8883c75bb..dc97e5d60d3663ef7f7c78c28603f9e1c5aea4ff 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.h
+++ b/extensions/browser/guest_view/app_view/app_view_guest.h
@@ -10,6 +10,7 @@
@@ -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

@@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index a23d9b8fc451078708fd1a39f3d74357de7c244f..f619f8a360b43b43174647cd596ab9c75c8ea1f1 100644
index d55c408557e15650897c9ed6d5b6bd83178a551f..f1c54919990af204004380b0d84ee750de5e3c35 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -275,8 +275,13 @@ void AsanProcessInfoCB(const char*, bool*) {
@@ -40,7 +40,7 @@ index a23d9b8fc451078708fd1a39f3d74357de7c244f..f619f8a360b43b43174647cd596ab9c7
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -982,7 +988,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -1005,7 +1011,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)

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

@@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
node initialization to not update flags after V8 initialization.
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index eb11068e932b7b94cbf215d6f84ae427ce77fcd5..9744e45974af215bfbe9e5feb2db7274f8efebf0 100644
index 7a20f5199bd6cb5d13f31ec5db3e3cc03821bc3a..22167f808cb7b27d5b2a8e517cdeee63205ab9ad 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -208,6 +208,9 @@ RenderProcessImpl::RenderProcessImpl()
@@ -212,6 +212,9 @@ RenderProcessImpl::RenderProcessImpl()
v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
}

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,7 +24,7 @@ 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 ed7d7512c7112eedcbbddf30ed4a0a0cff4b7e34..fbdf54a1003f30e5113309fa74e851a4eebea85d 100644
index 54ce1ea5ac11c9831a9553fbb5c5584c05440071..be95785fa144a4f11a3c97fea562dd4635ffe7b0 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1476,6 +1476,7 @@ void Navigator::RecordNavigationMetrics(

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

@@ -187,7 +187,7 @@ index 96c9563aac5847e742de5d9c9236f78bcb6cfd9c..73c9d585579ad5bdc407687b8becd0b7
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
}
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
index 9e01e61bf1fce448a93eaa3d5f363fc835b78538..d210af6fb317c922a8415a67a7ccd1d8a4a88ea1 100644
index e2c72b43f75b57ef1f49b82d3ecdfb425f8596de..51f8ff9b8424d098979a24c2e8628cdf7c4b758d 100644
--- a/content/browser/service_host/utility_process_host.cc
+++ b/content/browser/service_host/utility_process_host.cc
@@ -190,11 +190,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
@@ -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") {
@@ -522,7 +522,7 @@ index f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f4
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index ed921225298fbb4f6d12d7c49be825ee586d009c..78a393d96ddf4dc3bf8d1af297ed2642eacac495 100644
index 391004b202e6f20ad06eb6a53a6d55f5e8981c75..acb849f4e737de45e7aa4640b6866791424f010b 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -130,7 +130,8 @@ RootCompositorFrameSinkImpl::Create(

View File

@@ -80,7 +80,7 @@ index 801db538979ba62facdcf3a472dade56723ca639..7abac9a5b13b393713534ae51664c2e5
private:
const std::string service_interface_name_;
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
index d210af6fb317c922a8415a67a7ccd1d8a4a88ea1..0de01879f618555030e87ea79a94d41232811c2c 100644
index 51f8ff9b8424d098979a24c2e8628cdf7c4b758d..19d8ed89211402e93632c4d83dbf452d4194a14c 100644
--- a/content/browser/service_host/utility_process_host.cc
+++ b/content/browser/service_host/utility_process_host.cc
@@ -541,7 +541,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {

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

@@ -112,10 +112,10 @@ index 99bf736ebe303d46ab1ced924ba929a0cd258909..e10c8782d2704ff9cff8062d201a4339
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da5164580f 100644
index 35d3acb1a088a7b4cba7b062a62e8033c31dfe52..9770306449b39f26c047ed0c15cba9feae55c5d3 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -387,6 +387,9 @@ URLLoader::URLLoader(
@@ -386,6 +386,9 @@ URLLoader::URLLoader(
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
base::SequencedTaskRunner::GetCurrentDefault()),
per_factory_orb_state_(context.GetMutableOrbState()),
@@ -125,7 +125,7 @@ index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da
devtools_request_id_(request.devtools_request_id),
options_(PopulateOptions(options,
factory_params_->is_orb_enabled,
@@ -544,7 +547,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
@@ -521,7 +524,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
}
@@ -134,7 +134,7 @@ index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1225,6 +1228,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1126,6 +1129,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@@ -155,10 +155,10 @@ index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da
ad_auction_event_record_request_helper_.HandleResponse(
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 6832aca0d487d5cbf2fc445f1f07a17565cf9d45..78618a2c3d79455ff685d58d11b61d3d8468b7e1 100644
index f4d16508d4a34f9991b1b2f4e519e6cb2a7f5a73..099e146bc04bb4eb768c79099c5646ad7a029382 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -625,6 +625,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -599,6 +599,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

View File

@@ -32,7 +32,7 @@ index 0aae1d3b2777d5f6db711d1ade99b4bde24e76bf..e350f6789c710826e0885ccdc19e66e2
break;
}
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index f53158596f935545afde6a175138347a752f73e7..b267734bf2273253aa921728e12c753adfade02e 100644
index bc4dd4c643f2aa4cba07c0560e14f65f3c6aa291..b1c9f2d59559ed33cd32ad1f22b221029018cf0f 100644
--- a/content/browser/permissions/permission_controller_impl.cc
+++ b/content/browser/permissions/permission_controller_impl.cc
@@ -87,6 +87,7 @@ PermissionToSchedulingFeature(PermissionType permission_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 4c78563c29ce92c8217d288ed03f73fb482c6b49..aee0097df986cb4b3b75112fab828c59803e28d1 100644
index 0dbbaddc1bef8b5a1b253297f47c33601dc6fe67..0c84f727b29c742ba4c2edd38dfa16d1f48df76f 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -11159,6 +11159,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

@@ -13,7 +13,7 @@ messages in the legacy window handle layer.
These conditions are regularly hit with WCO-enabled windows on Windows.
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
index c6e88cee8640c56aad01721ab667b4255bd64a60..2742df0532c890fe97adf4a0c430c7718e5e73b5 100644
index 1c03162fbcda8ab75dcd53722f92e10403fbae08..a21c58d3f13fadf3a7888f4fe16c0e6cf6c215b0 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
@@ -328,12 +328,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message,

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 3b9e634245986b1ef22e8bf4e116470343f5ff60..4c30f71ced0da645637c989c08ccc93e463e755f 100644
index 05a102a33f4c05fe6d34fa721d37fcae05a3a577..459fc0eff0bfe2ec005d6f34cf7e91c2d601fd06 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9992,7 +9992,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,10 +20,10 @@ 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 7934e6a8a2498acbe822df05e6087b885384c6d7..3026ebee29af3ead9f505292317160409a190b29 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
@@ -460,6 +460,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -461,6 +461,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
mojom::EvaluationTiming,
mojom::LoadEventBlockingOption,
WebScriptExecutionCallback,
@@ -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,10 +215,10 @@ 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 f5adaadb9058e5fcad69d131f54ea06cb298b514..3315b02953685503d49a7e871fedf04262e80b71 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
@@ -1109,14 +1109,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -1111,14 +1111,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@@ -237,10 +237,10 @@ index f5adaadb9058e5fcad69d131f54ea06cb298b514..3315b02953685503d49a7e871fedf042
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 1b5e7a1a2bb5eb0b986dd6c61b4915d29a9a5667..19c8fdb320cbc84ba00b5e0b4b33a385b61b0db1 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
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final
@@ -198,6 +198,7 @@ class CORE_EXPORT WebLocalFrameImpl final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@@ -249,10 +249,10 @@ index 1b5e7a1a2bb5eb0b986dd6c61b4915d29a9a5667..19c8fdb320cbc84ba00b5e0b4b33a385
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,14 +6,16 @@ Subject: fix: select the first menu item when opened via keyboard
This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index a777b6b4c61c24cd2885134cccd5ada7d035cd5e..1a41b716ce5366497e60a691c23c7e62627b5748 100644
index d3e06148b22f06e6676bcda5fd8907595389887e..35f22b679494940ae1b1d64fa4eb17c41c0cc623 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -701,6 +701,14 @@ void MenuController::Run(Widget* parent,
@@ -711,6 +711,16 @@ void MenuController::Run(Widget* parent,
SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
}
+ if (source_type == ui::mojom::MenuSourceType::kKeyboard && context_menu && root->HasSubmenu()) {
+ if (source_type == ui::mojom::MenuSourceType::kKeyboard &&
+ (menu_type == MenuType::kContextMenu || menu_type == MenuType::kMenuItemContextMenu) &&
+ root->HasSubmenu()) {
+ // For context menus opened via the keyboard we select the first item by default
+ // to match accessibility expectations
+ MenuItemView* first_item = FindInitialSelectableMenuItem(root, INCREMENT_SELECTION_DOWN);
@@ -24,7 +26,7 @@ index a777b6b4c61c24cd2885134cccd5ada7d035cd5e..1a41b716ce5366497e60a691c23c7e62
if (button_controller) {
pressed_lock_ = button_controller->TakeLock(
false, ui::LocatedEvent::FromIfValid(event));
@@ -2407,19 +2415,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2426,19 +2436,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
}
item->GetSubmenu()->ShowAt(params);

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 3a7a6dc0a4e75c151379f8488d371439a808f1a9..0869aef8fce2829f7827d36c73af65ad71f7fdd3 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

@@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 24f6f89cfa430ed26476e1a3f79a8ed9464c45f3..a23d9b8fc451078708fd1a39f3d74357de7c244f 100644
index 48363b920c780064a6d49f4a521b476bda5ac27b..d55c408557e15650897c9ed6d5b6bd83178a551f 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -296,11 +296,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {

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 59721ed3c9e26fd83c553d82030f3e76af0c3dfd..e8a9715e9004e5d10aa96298332237c78796bf5b 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,18 +548,18 @@ 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 eca43bf620111c27c400ae2d95880e47c34fbc59..12ee7e75e437426f28002c7c9f4d5f5b5016ec53 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
@@ -35,6 +35,7 @@
#include "content/public/browser/browser_accessibility_state.h"
@@ -36,6 +36,7 @@
#import "content/public/browser/render_widget_host_view_mac_delegate.h"
#include "content/public/browser/scoped_accessibility_mode.h"
#include "content/public/common/content_features.h"
+#include "electron/mas.h"
#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"
@@ -2136,15 +2137,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 eca43bf620111c27c400ae2d95880e47c34fbc59..12ee7e75e437426f28002c7c9f4d5f5b
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 3256304fe1bfb80af0312f9046b1a78a2469956e..29281a0d8a4383ed4b2d5d8bac934acd54040aa8 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 126c0d51647ef46a12b2c47930f7bd49e55dd736..d61474fb3478a27450a037f50d2a734097eb4ca9 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 126c0d51647ef46a12b2c47930f7bd49e55dd736..d61474fb3478a27450a037f50d2a7340
]
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 126c0d51647ef46a12b2c47930f7bd49e55dd736..d61474fb3478a27450a037f50d2a7340
}
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 126c0d51647ef46a12b2c47930f7bd49e55dd736..d61474fb3478a27450a037f50d2a7340
]
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
@@ -3283,6 +3286,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 126c0d51647ef46a12b2c47930f7bd49e55dd736..d61474fb3478a27450a037f50d2a7340
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",
]
@@ -1848,7 +1848,7 @@ index 874ac9d572931fe175ccab8beb7738fe0a7b3c1b..b70e2a8a7be9e00a379f47c77589dde6
// Query the display's refresh rate.
if (@available(macos 12.0, *)) {
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index e531cb42cde9863ff1c4a13150f35877b564226c..0c0ec308be02297b090d08b52cc713c22652da36 100644
index c8f01a88e0d1797baf53c517341c735d9c6e6b4a..345743dd19f862cf2b4304d70cb47ce68e6895d1 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -337,6 +337,12 @@ component("gfx") {

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 5870b90b02ba5cf4b197e91ae9c9dc8fa3ebf7e4..bab3c9fdb1a90dd42394ab77732976e0b444a4e5 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 29281a0d8a4383ed4b2d5d8bac934acd54040aa8..0b943e7a4324b8ce9524d76f1cf4c6a2f187c595 100644
index 7964ac6af0fc3821b8208e34be766a712ccd2026..5bb585cb7f0ec4e15038bba89179817d43256719 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3159,8 +3159,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 4f87894219452e736311ad25a62b71b8aec4d158..7a8d7ce6f628123f5288d693046ca7602eeccac1 100644
index aec96f969800e2a4d09e644df770d367e48b1b63..c1c3db2992038cad0c01ce65c57676f8fe281830 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5878,6 +5878,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -5884,6 +5884,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@@ -60,10 +60,10 @@ index 4f87894219452e736311ad25a62b71b8aec4d158..7a8d7ce6f628123f5288d693046ca760
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 ff2a3cc31a9c8e24222d3614c58d0884c1fde260..641840c371a76a729d62d59703a5d5566ef76b3c 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;
@@ -72,7 +72,7 @@ index ff2a3cc31a9c8e24222d3614c58d0884c1fde260..641840c371a76a729d62d59703a5d556
RenderWidgetHostImpl* render_widget_host) override;
bool IsShowingContextMenuOnPage() const override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 4f97e13f9125e653f44acad78f8f35ee38e90b6d..f3c712e3f970dcccaac37e4dd407f14b52871269 100644
index 7e0dd469a7059ea38120cfd6cd17469a3c06c1fa..4fd3ab75b462cf169443473b968db64c765930b8 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -37,6 +37,7 @@

View File

@@ -28,7 +28,7 @@ index e350f6789c710826e0885ccdc19e66e2213820df..b8ba008470f39f6f3559d29b9eff0a23
break;
}
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index b267734bf2273253aa921728e12c753adfade02e..fd72e7d62ac45f51b2e7e295930ed25bb376056b 100644
index b1c9f2d59559ed33cd32ad1f22b221029018cf0f..81deda95c71f025b723571ca9a6ac20bc7bb4b0c 100644
--- a/content/browser/permissions/permission_controller_impl.cc
+++ b/content/browser/permissions/permission_controller_impl.cc
@@ -87,7 +87,15 @@ PermissionToSchedulingFeature(PermissionType permission_name) {

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 56b2fb93d5d85f520081de9e42e26ef3f8f6090e..b32e75e7c1922e63fdca891dfd7d4bcb27c5096e 100644
index 35de681eac3f65ce3e0435bd984159154ece2b7f..f2d5a85376109b6127ca4a7b3c26dbbb61990e20 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10129,25 +10129,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

@@ -1,73 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:46:21 -0700
Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 30ec1b5e2688b94bfe6a9c6cf55a839580e81e68..e9ee463b37ebc61d01fe1ceccbb6a280e33fd268 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -654,6 +654,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
host()->DidProcessFrame(frame_token, activation_time);
}
+RenderWidgetHostViewBase* RenderWidgetHostViewBase::CreateViewForWidget(
+ RenderWidgetHost* render_widget_host,
+ RenderWidgetHost* embedder_render_widget_host,
+ WebContentsView* web_contents_view) {
+ return web_contents_view->CreateViewForWidget(render_widget_host);
+}
+
void RenderWidgetHostViewBase::ProcessMouseEvent(
const blink::WebMouseEvent& event,
const ui::LatencyInfo& latency) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index c93e93d13f1013641709f5808bc1c66ea772d082..db5234cd13819d14b737aec3315e77e420e01603 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -30,6 +30,8 @@
#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
#include "components/viz/common/surfaces/surface_id.h"
#include "content/browser/renderer_host/display_feature.h"
+#include "content/browser/renderer_host/visible_time_request_trigger.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/content_export.h"
#include "content/public/browser/render_frame_metadata_provider.h"
#include "content/public/browser/render_widget_host.h"
@@ -73,11 +75,13 @@ namespace content {
class DevicePosturePlatformProvider;
class MouseWheelPhaseHandler;
class RenderWidgetHostImpl;
+class RenderWidgetHostViewGuest;
class ScopedViewTransitionResources;
class TextInputManager;
class TouchSelectionControllerClientManager;
class TouchSelectionControllerInputObserver;
class WebContentsAccessibility;
+class WebContentsView;
class DelegatedFrameHost;
class SyntheticGestureTarget;
@@ -151,6 +155,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency) override;
RenderWidgetHostViewBase* GetRootView() override;
+ virtual RenderWidgetHostViewBase* CreateViewForWidget(
+ RenderWidgetHost* render_widget_host,
+ RenderWidgetHost* embedder_render_widget_host,
+ WebContentsView* web_contents_view);
void OnAutoscrollStart() override;
const viz::DisplayHitTestQueryMap& GetDisplayHitTestQuery() const override;
@@ -199,6 +207,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
void NotifyContextMenuInsetsObservers(const gfx::Rect&) override {}
bool IsHTMLFormPopup() const override;
+ virtual void InitAsGuest(RenderWidgetHostView* parent_host_view,
+ RenderWidgetHostViewGuest* guest_view) {}
+
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(

View File

@@ -8,10 +8,10 @@ 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 a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47c34fbc59 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
@@ -170,6 +170,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -171,6 +171,15 @@ void ExtractUnderlines(NSAttributedString* string,
} // namespace
@@ -27,7 +27,7 @@ index a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47
// RenderWidgetHostViewCocoa ---------------------------------------------------
// Private methods:
@@ -774,6 +783,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
@@ -782,6 +791,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -37,7 +37,7 @@ index a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47
// Enable "click-through" if mouse clicks are accepted in inactive windows
return [self acceptsMouseEventsOption] > kAcceptMouseEventsInActiveWindow;
}
@@ -919,6 +931,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 a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -1253,6 +1269,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

@@ -233,10 +233,10 @@ index 7c99a9512e6f65713fe8483cef7b7c9b494b4491..8fb6cf252961c9773d1a6a09d47bec6a
}
diff --git a/content/common/features.cc b/content/common/features.cc
index 9a619bf9a4e2801d7a67bd26104066d03dcfb465..6aa5f4cb75bc8e22048b6b9bb8456a958ad7b80d 100644
index 9119155650ed4249c699cc57eaef9149b99e7297..13e2c0da07938d73b5a689cea19df4a445c4e5e5 100644
--- a/content/common/features.cc
+++ b/content/common/features.cc
@@ -300,6 +300,14 @@ BASE_FEATURE(kIOSurfaceCapturer,
@@ -294,6 +294,14 @@ BASE_FEATURE(kIOSurfaceCapturer,
base::FEATURE_ENABLED_BY_DEFAULT);
#endif
@@ -252,10 +252,10 @@ index 9a619bf9a4e2801d7a67bd26104066d03dcfb465..6aa5f4cb75bc8e22048b6b9bb8456a95
// invalidated upon notifications sent by base::SystemMonitor. If disabled, the
// cache is considered invalid on every enumeration request.
diff --git a/content/common/features.h b/content/common/features.h
index 7bc79ead73e5e51d7735d6964cf96990120670ca..83b5666e735aa99a8e2300b37154da1769baa2b0 100644
index 0764c2fd1086bb0da16df91c95b171eea0a06bb1..3bc7a54999ec5e1f3afa45fe59d43ba12ec10286 100644
--- a/content/common/features.h
+++ b/content/common/features.h
@@ -100,6 +100,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
@@ -99,6 +99,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
#if BUILDFLAG(IS_MAC)
CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer);
#endif

View File

@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Maddock <smaddock@slack-corp.com>
Date: Fri, 28 Mar 2025 20:22:26 -0400
Subject: revert: Enable CREL for arm32 targets
Enabling CREL on Linux ARM64 seems to cause it to segfault. Disable for Electron
as its one of our supported platforms.
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index e579cc9a9d1fd01d390a64886f649dc53102166e..de1f3b7b1a33bf5ab4f6922f0cb2d305a8af7550 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -619,7 +619,8 @@ config("compiler") {
# Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
# (excluding toolchains that use an older version of LLVM).
- if (is_linux && use_lld && !llvm_android_mainline &&
+ # TODO(crbug.com/376278218): This causes segfault on Linux ARM builds.
+ if (is_linux && use_lld && !llvm_android_mainline && current_cpu != "arm" &&
default_toolchain != "//build/toolchain/cros:target") {
cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
}

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 f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c..3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72 100644
index 2ad1479de622d956c701d8dc4adb75d0114f65b1..3d4510df709ed60a1da7163d3226541ed8ff201c 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3947,6 +3947,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 f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c..3ec3dd8f89bb167ed82c0da95a0f1d3d
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3957,6 +3964,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_);
}
@@ -35,7 +35,7 @@ index f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c..3ec3dd8f89bb167ed82c0da95a0f1d3d
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 437060750090e974a3257979c215d13d036afa4e..5dce8d4e37845e1bb1922d7c4da3208939549b27 100644
index 9360a2b080ebe4d6c0a475b0a536a5d7212c8a86..6e5eebfb199d322028f6b2bc72d666c24f334bba 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -121,10 +121,13 @@ class BrowserPluginGuestDelegate;
@@ -52,7 +52,7 @@ index 437060750090e974a3257979c215d13d036afa4e..5dce8d4e37845e1bb1922d7c4da32089
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -270,6 +273,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
@@ -274,6 +277,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;

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 7b45a0006af60400f5d8ba5b925f971cb5cf393e..5870b90b02ba5cf4b197e91ae9c9dc8fa3ebf7e4 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
@@ -8884,6 +8884,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -8883,6 +8883,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@@ -37,10 +37,10 @@ index 7b45a0006af60400f5d8ba5b925f971cb5cf393e..5870b90b02ba5cf4b197e91ae9c9dc8f
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 3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72..3b9e634245986b1ef22e8bf4e116470343f5ff60 100644
index 3d4510df709ed60a1da7163d3226541ed8ff201c..05a102a33f4c05fe6d34fa721d37fcae05a3a577 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4222,21 +4222,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 3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72..3b9e634245986b1ef22e8bf4e1164703
}
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4395,7 +4399,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 0f3a5d69bef697a7787b68cd1c8261c67993edf3..1d49c1190ba7d47a76993b7f291119be243d189e 100644
index 69673b4aa636c2b55065aa11ce65dbc4a45c39b8..bdf133c0cdd524a72d3ad78fa97102b44c336f51 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -741,6 +741,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,

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