* 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>
* chore: bump chromium in DEPS to 143.0.7485.0
* chore: update allow_disabling_blink_scheduler_throttling_per_renderview.patch
Move SetSupportsDraggableRegions mojom IPC from chrome/ and extensions/ to blink/ | https://chromium-review.googlesource.com/c/chromium/src/+/7043264
Patch applied manually due to context shear
* Move SetSupportsDraggableRegions mojom IPC from chrome/ and extensions/ to blink/ | https://chromium-review.googlesource.com/c/chromium/src/+/7043264
* chore: e patches all
* chore: check for file existence before setting utime
* chore: stop disabling kWinDelaySpellcheckServiceInit
[cleanup] Remove feature WinDelaySpellcheckServiceInit | https://chromium-review.googlesource.com/c/chromium/src/+/7012087
This flag has been removed upstream. We've used it since c2d7164 (#38248)
to fix a crash originally described in 97b353a (#34993):
> Delaying spell check initialization is causing specs for
> 'custom dictionary word list API' to fail in Electron.
Since we haven't touched this in a few years, and since there's a
clear success criteria (a passing/failing spec), and since the patch
to restore this flag would be pretty large (~750 lines), I'm going
to try just removing the flag from our source to see if the spec
passes or fails.
* Revert "chore: stop disabling kWinDelaySpellcheckServiceInit"
This reverts commit e688880396.
Unfortunately, the crash persists.
* Revert [cleanup] Remove feature WinDelaySpellcheckServiceInit | https://chromium-review.googlesource.com/c/chromium/src/+/7012087
We currently need this feature
* fixup! chore: check for file existence before setting utime
* fixup! Move SetSupportsDraggableRegions mojom IPC from chrome/ and extensions/ to blink/ | https://chromium-review.googlesource.com/c/chromium/src/+/7043264
Address Robo's code review @ 64c7fd21ed
* fixup! fixup! chore: check for file existence before setting utime
fix: oops typo
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
perf: two minor perf refactors in InvokeIpcCallback()
1. Allocate the CallbackScope on the stack instead of the heap
2. Skip a redundant call to node::Environment::GetCurrent()
* 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*
* chore: bump chromium in DEPS to 140.0.7330.0
* chore: bump chromium in DEPS to 140.0.7331.0
* chore: update patches
* fix: gn check failing on crashpad.h
Not yet sure what caused this
* fix: predictors::PreconnectManager -> content::PreconnectManager
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473
* chore: bump chromium in DEPS to 140.0.7333.0
* chore: bump chromium in DEPS to 140.0.7335.0
* chore: bump chromium in DEPS to 140.0.7337.0
* chore: update patches
* chore: restore some gin utility
* 6804057: [Extensions] Validate nodoc is specified as a boolean in schemas
https://chromium-review.googlesource.com/c/chromium/src/+/6804057
* fixup! chore: restore some gin utility
* fixup! fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473
* 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected
https://chromium-review.googlesource.com/c/chromium/src/+/6772346
Not certain about what the "correct" argument to pass here is. A quick dive into the CL suggests that passing `false` is safe to keep things working. The blast radius if this assumption is wrong is that "fling" scroll gestures may not work as expected with the OSR.
* 6789383: Uninstall SODA language pack after 30 days of inactivity
https://chromium-review.googlesource.com/c/chromium/src/+/6789383
* chore: update libcxx filenames
* chore: bump chromium in DEPS to 140.0.7339.0
* chore: update patches
* fixup! 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346
* chore: bump chromium in DEPS to 140.0.7339.2
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: clavin <clavin@electronjs.org>
* 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: add a v8::Isolate* arg to RendererClientBase::IsWebViewFrame()
Needed for creating gin dictionaries
refactor: add a v8::Isolate* arg to ShouldLoadPreload()
Needed for calling IsWebViewFrame()
* refactor: add a v8::Isolate* arg to electron::util::CompileAndCall()
* refactor: add a v8::Isolate* arg to OnCreatePreloadableV8Context()
* refactor: add a v8::Isolate* arg to InvokeEmitProcessEvent()
* refactor: add a v8::Isolate* arg to ServiceWorkerData's constructor
* refactor: add a v8::Isolate* arg to RendererClientBase::SetupMainWorldOverrides()
* refactor: add a v8::Isolate* arg to RendererClientBase::WilLReleaseScriptContext()
* docs: update docs to avoid v8::Context::GetIsolate()
* refactor: add a v8::Isolate* arg to ElectronSandboxedRendererClient::InitializeBindings()
* refactor: avoid v8::Context::GetIsolate() call in PromiseBase::SettleScope::~SettleScope()
* refactor: add a v8::Isolate* arg to Constructible::GetConstructor()
* refactor: add a v8::Isolate* arg to NodeBindings::Initialize()
This is needed for the GetConstructor() call
* refactor: avoid v8::Context::GetIsolate() call in GetIpcObject() by taking it as an arg
* refactor: avoid v8::Context::GetIsolate() call in ipc_native::EmitIPCEvent() by taking it as an arg
* 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
* fix: add back fallback wasm-trap handling
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5372409
This change sets up wasm-trap handling for the case where content_shell
has not enabled crash reporting but moves the responsibility to
ElectronRendererClient. The default ContentRendererClient assumes
that crash reporting is enabled (crashpad enabled by default) and does
not set up its own handler.
* chore: fix build
---------
Co-authored-by: deepak1556 <hop2deep@gmail.com>
* 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: use an absl::flat_hash_set for UsbChooserContext::ephemeral_devices_
* perf: use an absl::flat_hash_set for GlobalMenuBarRegistrarX11::live_windows_
* perf: use an absl::flat_hash_set for NativeWindowViews::forwarding_windows_
* perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::guest_host_views_
perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::proxy_views_
* perf: use an absl::flat_hash_set for NativeWindow::injected_frames_
* perf: use an absl::flat_hash_set for NativeWindow::background_throttling_sources_
* feat: Corner Smoothing CSS rule (Reland)
Reland of #45185
* Fix patch conflicts
* fixup! Fix patch conflicts
* Update expected image
The dashed border is subtly different. The new version is correct and the old one was incorrect.
refactor: small refactor to WebWorkerObserver::WorkerScriptReadyForEvaluation()
- replace a std::vector<std::string> local with a compile-time array
of std::string_view
- remove .c_str() pessimization when making v8 Strings from string_views
* 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