* chore: bump chromium in DEPS to 145.0.7588.0
* fix(patch-conflict): update scroll_bounce_flag for split overscroll methods
Chromium split IsElasticOverscrollEnabled() into two methods:
IsElasticOverscrollEnabledOnRoot() and IsElasticOverscrollSupported().
Updated patch to apply the scroll-bounce command-line switch to both
methods.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7233733
* fix(patch-conflict): update exclusive_access patch context
Upstream refactored the profile variable declaration. Updated patch to
match new surrounding context with brace-style if statement.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7239252
* fix(patch-conflict): update screen capture kit non-shareable filter
Upstream refactored PiP window exclusion to use GetWindowsToExclude()
helper function. Updated patch to combine non-shareable window filtering
with the new helper's output.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7274596
* fix(patch-conflict): update corner smoothing CSS property id position
Upstream added new internal overscroll CSS properties. Updated patch to
add kElectronCornerSmoothing after the new entries.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7234051
* fix(patch-conflict): update permission patches for new permission types
Upstream added new permission types: LOCAL_NETWORK, LOOPBACK_NETWORK,
and GEOLOCATION_APPROXIMATE. Updated Electron permission patches to
include these new types and renumber Electron-specific permissions.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7231952
* fix(patch-conflict): update memory query fallback for new function signature
Upstream added AmountOfTotalPhysicalMemory() with PCHECK. Updated patch
to maintain fallback logic with correct ByteSize return type.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7254886
* chore: update patch hunk headers
* fix(patch): update reclient-configs patch to use new file mode
The fix_add_python_remote_wrapper patch was using 'copy from' mode
which caused inconsistent behavior between local and CI git versions.
Changed to 'new file' mode for consistent patch application.
* fix(patch-conflict): remove duplicate GEOLOCATION_APPROXIMATE case
Upstream moved GEOLOCATION_APPROXIMATE earlier in the switch statement
in GetPermissionString(). The 3-way merge kept both the old and new
positions, causing a duplicate case error.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/6397637
* chore: update libcxx filenames for new headers
* chore: bump chromium in DEPS to 145.0.7590.0
* chore: update patch hunk headers
* fix(patch): update memory fallback return type to ByteSize
Upstream changed the return type from ByteCount to ByteSize.
* fix: suppress nodiscard warning in node_file.cc
libc++ added [[nodiscard]] to std::filesystem::copy_options operator|=
which causes build failures with -Werror.
* 7229082: update CopyFromSurface to use CopyFromSurfaceResult
Upstream changed CopyFromSurface callback to return
base::expected<viz::CopyOutputBitmapWithMetadata, std::string>
instead of SkBitmap, enabling better error handling.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7229082
* 7254070: add ip_address_space param to OnLocalNetworkAccessPermissionRequired
Upstream added IPAddressSpace parameter to check address space for
proper permission handling in Local Network Access.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7254070
* 7136679: add spelling_markers param to RequestCheckingOfText
Upstream added spelling_markers parameter to report misspelling
ranges from Blink to Spellcheck to IME.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7136679
* 7240487: remove second param from RegisterWebSafeIsolatedScheme
Upstream removed the schemes_okay_to_appear_as_origin_headers_ parameter.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7240487
* 7254577: use explicit WebElement constructor
WebElement default constructor now requires explicit construction
rather than brace initialization.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7254577
* 7256335: remove override from CreateGlobalFeaturesForTesting
Upstream removed BrowserProcess::CreateGlobalFeaturesForTesting virtual
method so the override specifier is no longer valid.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7256335
* chore: add missing SingleThreadTaskRunner include
A transitive include of SingleThreadTaskRunner was removed upstream,
requiring an explicit include.
Ref: Unable to locate specific CL (transitive include change)
* 7260483: add LOCAL_NETWORK, LOOPBACK_NETWORK permission type cases
Upstream added new permission types for Local Network Access split
permissions.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7260483
* chore: update patch hunk headers
* 7264893: update postMessage tests for file: origin serialization change
Chromium now serializes file: origins as 'null' in MessageEvent per spec.
This is a security improvement aligning with the HTML spec behavior.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7264893
* fix: add paths to custom scheme URLs in protocol tests
Custom scheme URLs without paths (e.g. test-scheme://foo) cause a
DCHECK crash in ASAN builds when CorsURLLoader tries to log the
request via GenerateRequestLine -> PathForRequest, which asserts
that the path is non-empty.
Adding trailing slashes ensures URLs have valid paths.
* chore: bump chromium in DEPS to 145.0.7592.0
* chore: update patches (trivial only)
* chore: bump chromium in DEPS to 145.0.7594.0
* chore: bump chromium in DEPS to 145.0.7596.0
* chore: update accelerator.patch
no manual changes; patch applied with fuzz 2 (offset 1 line)
* chore: update patches (trivial only)
* chore: node ./script/gen-libc++-filenames.js
---------
Co-authored-by: Alice Zhao <alicelovescake@anthropic.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: make api::Clipboard::GetClipboardBuffer() private
* refactor: move GetClipboadBuffer() into anonymous namespace
* refactor: use gin::Arguments in StopRecording()
* refactor: use gin::Arguments in ImageView::New()
* refactor: use gin::Arguments in AppendSwitch()
* refactor: use gin::Arguments WebContentsView::New()
* refactor: make gin::Arguments arg const in WrappableBase::InitWithArgs()
This makes explicit that we are using it for wrapper + isolate, not the args values
* refactor: remove gin_helper::Arguments arg from ExposeAPI()
refactor: remove gin_helper::Arguments arg from ExposeAPIInWorld()
* refactor: remove gin_helper::Arguments arg from ElectronBindings::GetSystemMemoryInfo()
* refactor: remove gin_helper::Arguments arg from preload_utils::GetBinding()
* refactor: use gin::Arguments in OpenExternal()
* refactor: use gin::Arguments in ExecuteInWorld()
* refactor: use gin::Arguments in ExecuteJavaScript()
* refactor: use gin::Arguments in InvokeNew()
* refactor: use gin::Arguments in ExecuteJavaScriptInIsolatedWorld()
* refactor: remove unused GetNextArgument() marshaller for gin_helper::Arguments
* refactor: remove unused #include gin_helper/arguments.h
* chore: remove unused gin_helper::Arguments
* fixup! refactor: use gin::Arguments in ExecuteJavaScriptInIsolatedWorld()
Xref: https://github.com/electron/electron/pull/48447
* refactor: narrow App:SetJumpList() arg from gin::Arguments* to v8::Isolate*
* refactor: narrow WebContents::AddWorkSpace() arg from gin::Arguments* to v8::Isolate*
* refactor: narrow ShowMessageBox() arg from gin::Arguments* to v8::Isolate*
* refactor: narrow ShowOpenDialog() arg from gin::Arguments* to v8::Isolate*
* refactor: remove unused gin::Arguments* arg from OverrideGlobalPropertyFromIsolatedWorld()
* refactor: narrow WebContents::StartDrag() arg from gin::Arguments* to v8::Isolate*
* refactor: narrow NetLog::StopLogging() arg from gin::Arguments* to v8::Isolate*
* refactor: narrow Protocol::IsProtocolHandled() arg from gin::Arguments* to v8::Isolate*
* refactor: remove GetIsolate() calls from SetPrivate()
* refactor: remove excess GetIsolate() calls in PassValueToOtherContextInner()
* refactor: remove GetIsolate() calls from GetPrivate()
* refactor: add a v8::Isolate* local to ProxyFunctionWrapper()
* refactor: remove error_context->GetIsolate() call from PassValueToOtherContextInner()
* refactor: remove GetIsolate() call from ProxyFunctionWrapper()
* refactor: pass source and destination isolate as arg to CreateProxyForAPI()
* chore: move gin::DeprecatedWrappable to gin_helper
This is in preparation for migrating to gin::Wrappable
based on cppgc #47922
The upstream class will be deleted soon via roller PR but
the cppgc migration should happen outside the roll, this
change retains the current functionality by copying the
implementation into //electron/shell/common/gin_helper.
The class can be deleted once the cppgc migration is complete.
* chore: fix lint:cpp
* refactor: pass an isolate when calling GetCreationContextChecked() in V8FunctionInvoker
* refactor: pass an isolate when calling GetCreationContextChecked() in RendererClientBase
* refactor: pass an isolate when calling GetCreationContextChecked() in ScriptExecutionCallback::Completed()
* refactor: pass an isolate when calling GetCreationContextChecked() in ScriptExecutionCallback::CopyResultToCallingContextAndFinalize()
* refactor: pass an isolate when calling GetCreationContextChecked() in electron::GetRenderFrame()
* refactor: pass an isolate when calling GetCreationContextChecked() in gin_helper::internal::CallMethodWithArgs()
* refactor: pass an isolate when calling GetCreationContextChecked() in OverrideGlobalPropertyFromIsolatedWorld()
* refactor: pass an isolate when calling GetCreationContextChecked() in OverrideGlobalValueFromIsolatedWorld()
* refactor: pass an isolate when calling GetCreationContextChecked() in ProxyFunctionWrapper()
* refactor: pass an isolate when calling GetCreationContextChecked() in PassValueToOtherContextInner()
* fixup! refactor: pass an isolate when calling GetCreationContextChecked() in electron::GetRenderFrame()
* refactor: local functions GetPrivate(), SetPrivate() now take std::string_views
* refactor: make local keys std::string_views instead of C-style char arrays
* refactor: make local keys constexpr
* refactor: move local keys into local anonymous namespace
* Remove microtasks_scope.h and microtasks_scope.cc
* Use v8::MicrotasksScope when ignoring browser checkpoint
These call always skip the browser checkpoint, so they are equivalent to using v8::MicrotasksScope directly (modulo the optional wrapper behavior).
* Remove MicrotasksScope from node_bindings.cc
This code seems contradictory: it explicitly specifies "do not run microtasks" yet runs a microtask checkpoint in the browser process.
Looking at its history, it [was introduced][1] with the intention to not run microtasks, but a [subtle C++ language behavior][2] caused it to do the opposite later in the same roll. Since the original intention was to not run microtasks, and since that is also the simplest explanation, we can assume `ignore_browser_checkpoint` should be true and migrate this to `v8::MicrotasksScope` as it is equivalent (modulo the optional wrapper behavior).
[1]: a4ea80dd47 (diff-efe58cf03c97028f37f801db044d396a5f428686da6595d2c692f1c052bbd09c)
[2]: https://github.com/electron/electron/pull/43185
* Migrate gin_helper/promise.h and gin_helper/promise.cc to v8::MicrotasksScope
Restores the [original][1] behavior of running the microtask checkpoint at destruction, but preserves the behavior of running microtasks in the browser process. This had last changed in the migration to gin_helper::MicroTasks.
[1]: https://github.com/electron/electron/pull/16401
* fix: do not run microtasks in V8Serializer in browser process
* Remove no-op MicrotasksScope in `shell/browser/api/electron_api_auto_updater.cc`
This call was added in https://github.com/electron/electron/pull/40576 as an expansion of `gin_helper::EmitEvent`.
Since this only runs in the browser process and `bool ignore_browser_checkpoint = true` this code is a no-op.
Node should perform a microtask checkpoint if necessary in `node::MakeCallback`.
* Remove no-op MicrotasksScope in `shell/common/api/electron_bindings.cc`
This method is only called by the browser process. The containing function, `ElectronBindings::DidReceiveMemoryDump`, is only used in two places:
* `ElectronBindings::GetProcessMemoryInfo` in the same file, which has a `CHECK` that it's running in the browser process at the top.
* From `shell/browser/api/electron_api_web_contents.cc`, which is only run in the browser process.
Added a DCHECK for clarity and validation.
* Replace `gin_helper::MicrotasksScope` with `v8::MicrotasksScope` in `shell/renderer/`
The browser check is unnecessary in the renderer. Since `gin_helper::MicrotasksScope` will always act exactly like `v8::MicrotasksScope`, it's clear to just use the v8 object directly. This also brings them in line with the many other uses of `v8::MicrotasksScope` in `shell/renderer/`.
* perf: make ElectronUsbDelegate::controller_map_ an absl::flat_hash_map
* perf: make ElectronSerialDelegate::controller_map_ an absl::flat_hash_map
* perf: make ElectronHidDelegate::controller_map_ an absl::flat_hash_map
* perf: make FrameTreeNodeIdMap an absl::flat_hash_map
* perf: make AutofillDriverFactory::driver_map_ an absl::flat_hash_map
* perf: make asar::Archive::external_files_ an absl::flat_hash_map
* perf: make VersionIdMap an absl::flat_hash_map
* perf: make ObjectCache::proxy_map_ an absl::flat_hash_map
* docs: add TODO to investigate absl map in KeyWeakMap
* chore: bump chromium in DEPS to 136.0.7052.0
* chore: update mas_avoid_private_macos_api_usage.patch.patch
https://chromium-review.googlesource.com/c/chromium/src/+/6318359
patch applied manually due to context shear
* chore: update preconnect_manager.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6318420
patch applied manually due to context shear
* chore: e patches all
* chore: bump chromium to 136.0.7053.1
* chore: update fix_remove_profiles_from_spellcheck_service.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6326575
patch applied manually due to context shear
* chore: e patches all
* chore: revert removal of v8 API used by Node.js
* devtools: Remove DevToolsUIBindings::SendJsonRequest() | https://chromium-review.googlesource.com/c/chromium/src/+/6326236
* 6244461: Merge //content/common/user_agent.cc into //components/embedder_support:user_agent | https://chromium-review.googlesource.com/c/chromium/src/+/6244461
* 6313744: Migrate views::Background factory methods to ColorVariant | https://chromium-review.googlesource.com/c/chromium/src/+/6313744
* 6314545: Remove multiple argument support from base::ToString() | https://chromium-review.googlesource.com/c/chromium/src/+/6314545
* 6317362: [Extensions] Inline MessagingDelegate::CreateReceiverForTab() | https://chromium-review.googlesource.com/c/chromium/src/+/6317362
* 6308998: Add SettingAccess structured metrics event for DevTools | https://chromium-review.googlesource.com/c/chromium/src/+/6308998
* 6295214: Remove redundant state field in per-extension preferences | https://chromium-review.googlesource.com/c/chromium/src/+/6295214
NB: this change is copied from the upstream change to extensions/shell/browser/shell_extension_loader.cc
* fix: ui/ linter error
This is showing up in an eslint build step in Electron:
> /__w/electron/electron/src/out/Default/gen/ui/webui/resources/cr_elements/preprocessed/cr_menu_selector/cr_menu_selector.ts
> 77:23 error This assertion is unnecessary since the receiver accepts the original type of the expression @typescript-eslint/no-unnecessary-type-assertion
>
> ✖ 1 problem (1 error, 0 warnings)
> 1 error and 0 warnings potentially fixable with the `--fix` option.
However, removing the assertion causes a typescript build failure:
> gen/ui/webui/resources/cr_elements/preprocessed/cr_menu_selector/cr_menu_selector.ts:77:23 - error TS2345: Argument of type 'HTMLElement | null' is not assignable to parameter of type 'HTMLElement'.
> Type 'null' is not assignable to type 'HTMLElement'.
>
> 77 items.indexOf(this.querySelector<HTMLElement>(':focus'));
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So I think the two different steps may be picking up typescript definitions.
This patch should be removed after the issue is tracked down
and fixed in a followup task.
* fix: -Wnonnull warning
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.
* docs: add upstream pr link for Node patch
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
`ReadUnicodeCharacter` updates index to the last character read, and not after it. We need to manually increment it to move to the next character.
It also doesn't validate that the index is valid, so we need to check that index is within bounds.
Refs: #44336
* refactor: more return-braced-init-list, this time for v8 and gin objects
* refactor: more return-braced-init-list, this time for v8, gin, std, and base objects
* refactor: misc-use-internal-linkage warnings in context bridge
move impl functions into anonymous namespace so that they're not visible
to other compilation units:
- ExposeAPIInWorld()
- IsCalledFromMainWorld()
- OverrideGlobalPropertyFromIsolatedWorld()
- OverrideGlobalValueFromIsolatedWorld()
- TraceKeyPath()
* refactor: misc-use-internal-linkage warnings in skia util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- struct ScaleFactorPair
- kScaleFactorPairs[]
- GetScaleFactorFromPath()
- AddImageSkiaRepFromPath()
* refactor: misc-use-internal-linkage warnings in printing util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetFullPagePlugin()
* refactor: misc-use-internal-linkage warnings in blijnk converter
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetKeyLocationCode()
- ModifiersToArray()
* refactor: misc-use-internal-linkage warnings in extrension system
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- ParseManifest()
* refactor: misc-use-internal-linkage warnings in skia util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetFrameTokenMap()
- GetFrameTreeNodeIdMap()
* refactor: misc-use-internal-linkage warnings in electron_api_utility_process.cc
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetAllUtilityProcessWrappers()
* refactor: misc-use-internal-linkage warnings in electron_api_menu
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- InvokeBoolMethod()
* refactor: misc-use-internal-linkage warnings in platform util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- struct TrashItemResult
- TrashItemOnBlockingThread()
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
NB: using the braced-initializer list uncovered an error here:
the float returned by std::floor() can't be implicitly cast to
an int. This is solved by using base::ClampFloor<int>() instead.
std::floor()
* perf: prefer NewFromUtf8Literal() over NewFromUtf8() for string literals
the string length is known at compile time and no need to call ToLocalChecked()
* perf: string length is known when calling NewFromUtf8(), so use it
* perf: remove unnecessary calls to c_str()
these just force the code being called to have to recalculate the string length
* refactor: in FramelessView, move empty function decls to header
* refactor: in electron::api::WebContents, move empty function decls to header
* refactor: in electron::api::NativeWindow, move empty function decls to header
* refactor: in electron::OffScreenWebContentsView, move empty function decls to header
* refactor: in electron::OffScreenRenderWidgetHostView, move empty function decls to header
* refactor: in auto_updater::AutoUpdater, move empty function decls to header
* refactor: in electorn::api::FrameSubscriber, move empty function decls to header
* refactor: in electorn::api::SimpleURLLoaderWrapper, move empty function decls to header
* refactor: in electorn::InspectableWebContents, move empty function decls to header
* refactor: in electorn::OffScreenVideoConsumer, move empty function decls to header
* refactor: in electron::OffScreenWebContentsView, move empty function decls to header
* refactor: in electron::TrayIcon, move empty function decls to header
* refactor: in electron::ViewsDelegate, move empty function decls to header
* refactor: in electron::MediaCaptureDevicesDispatcher, move empty function decls to header
* refactor: in electron::UsbChooserContext::DeviceObserver, move empty function decls to header
* refactor: in electron::ProxyingWebSocket, move empty function decls to header
* refactor: in electron::Notification, move empty function decls to header
* refactor: in electron::PlatformNotificationService, move empty function decls to header
* Revert "refactor: in electron::PlatformNotificationService, move empty function decls to header"
This reverts commit 9103750d03b9ba1ceccba43d11dfdc2404ff6191.
* refactor: in electron::ElectronPDFDocumentHelperClient, move empty function decls to header
* refactor: in electron::api::SpellCheckClient, move empty function decls to header
* refactor: in electron::ElectronExtensionHostDelegate, move empty function decls to header
* refactor: in electron::PlatformNotificationService, move empty function decls to header
* refactor: in electron::NativeWindowViews, move empty function decls to header
* chore: move SetTouchBar() back to cc
* Revert "refactor: in auto_updater::AutoUpdater, move empty function decls to header"
This reverts commit c43d6862d3.
* chore: remove unused electron::ObjectLifeMonitor
The last users were removed in June 2020 e1e73fa5f (#24115)
and May 2020 9d7ba982 (#23592).
* fixup! chore: remove unused electron::ObjectLifeMonitor
fix: oops