Commit graph

1137 commits

Author SHA1 Message Date
wujinli
3e78bbde6a
fix: crash when renderer process crashes while webview is reloading (#46735)
WebView uses WebContentsViewChildFrame, which doesn't have a Focus impl
and triggers a fatal NOTREACHED.
2025-04-25 10:10:27 +02:00
Charles Kerr
e9f279afd1
chore: remove WebContents.getNativeView() (#46734)
chore: remove never-used WebContents.getNativeView().

This was added in https://github.com/electron/electron/pull/10308 but
was never used and never documented, not even as experimental API.
2025-04-23 20:33:50 -05:00
Charles Kerr
c7b0bdab7e
fix: explicitly call GetNativeNSView() on macOS (#46733)
* fix: explicitly call GetNativeNSView() on macOS

* chore: move macOS impl to a .mm file

This is needed in order to access gfx::NativeView::GetNativeNSView()
2025-04-23 17:55:18 -05:00
electron-roller[bot]
dd03cceda0
chore: bump chromium to 137.0.7128.1 (main) (#46482)
* chore: bump chromium in DEPS to 137.0.7107.0

* chore: bump chromium in DEPS to 137.0.7109.0

* chore: bump chromium in DEPS to 137.0.7111.0

* chore: bump chromium in DEPS to 137.0.7113.0

* 6384240: Remove double-declaration for accessibility on macOS | 6384240

* 6422872: Remove unused includes in isolation_info_mojom_traits.h | 6422872

* chore: update patches

* 6400733: Avoid ipc_message_macros.h usage in some foo_param_traits_macros.h files | 6400733

* chore: update patches

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

* chore: iwyu

* refactor: prefer value initialization over memset()

From the looks up upstream commits in base/, it looks like memset()
could trigger `-Wunsafe-buffer-usage` warnings soon?

Value initialization is more C++ish and less error-prone anyway,
due to memset()'s easily swappable parameters.

* refactor: NotifyIcon::InitIconData() returns a NOTIFYICONDATA

This follows F.20 in the C++ Core Guidelines and also removes the need
for memset()

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- strcmp()

* fixup!  6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

* 6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | 6433203

* chore: bump chromium in DEPS to 137.0.7115.0

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* chore: update patches

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* fix: add pragma for MacSDK unsafe buffers | 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

* chore: bump chromium in DEPS to 137.0.7117.0

* chore: update patches

* chore: update filesnames.libcxx.gni

* 6431756: Replace SetOwnedByWidget() bool arg with a PassKey. | 6431756

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* 6428345: Remove ExtensionService usage from ChromeExtensionRegistrarDelegate | 6428345

* 6384315: Migrate extensions_enabled from ExtensionService to Registrar | 6384315

* 6428749: [extensions] Refactor ExtensionService for AddNewAndUpdateExtension. | 6428749

* chore: bump chromium in DEPS to 137.0.7119.0

* 6440290: corner-shape: support inset shadow | 6440290

* 6429230: FSA: Move blocked paths to the PermissionContext class | 6429230

* chore: update patches

* chore: bump chromium in DEPS to 137.0.7121.0

* chore: update patches

* fix: partially revert 6443473: Remove ItemDelete from the Mac version of AppleKeychain | 6443473

* fix: update filenames.libcxx.gni

* chore: bump chromium in DEPS to 137.0.7123.0

* chore: update patches

* chore: "grandfather in" electron views too

Lock further access to View::set_owned_by_client() | 6448510

* chore: update feat_corner_smoothing_css_rule_and_blink_painting.patch

corner-shape: support inset shadow | 6440290

* refactor: grandfather in AutofillPopupView as a subclass of WidgetDelegateView

Add a PassKey for std::make_unique<WidgetDelegateView>() | 6442265

* Provide dbus appmenu information on Wayland | 6405535

* [extensions] Move OnExtensionInstalled out of ExtensionService. | 6443325

* refactor: grandfather in NativeWindowViews for delete callbacks

6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | 6433203

* chore: merge the four "grandfather" patches into one

* [A11yPerformance] Remove IsAccessibilityAllowed() | 6404386: [A11yPerformance] Remove IsAccessibilityAllowed() | 6404386

NB: the changes here are copied from the upstream changes in
chrome/browser/ui/webui/accessibility/accessibility_ui.cc

* 6420753: [PermissionOptions] Use PermissionDescriptorPtr in PermissionController | 6420753

* 6429573: [accessibility] Move mode change out of AccessibilityNotificationWaiter | 6429573

* chore: e patches all

* 6419936: [win] Change ScreenWin public static methods to virtual | 6419936

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- fprintf()
- fputs()
- snprintf()
- vsnprintf()

* fix: size conversion FTBFS on Win

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- wcscpy_s()

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | 6423410

remove all uses of:

- wcsncpy_s()

* chore: update mas_avoid_private_macos_api_usage.patch.patch

6394283: Remove double-declaration for accessibility on iOS | 6394283

Lots of context shear in this commit but the only interesting part is:

-+  return nullptr;
++  return {};

Which is needed because the return type is sometimes not a pointer.

* chore: e patches all

* chore: disable -Wmacro-redefined warning in electron_main_win.cc

* chore: bump chromium in DEPS to 137.0.7123.5

* refactor: patch electron PermissionTypes into blink

6387077: [PermissionOptions] Generalize PermissionRequestDescription | 6387077

* chore: e patches all

* chore: remove the box_painter_base.cc part of feat_corner_smoothing_css_rule_and_blink_painting.patch

as per code review @ https://github.com/electron/electron/pull/46482#pullrequestreview-2777338370

* test: enable window-smaller-than-64x64 test on Linux

* chore: bump chromium in DEPS to 137.0.7124.1

* chore: bump chromium in DEPS to 137.0.7125.1

* chore: bump chromium in DEPS to 137.0.7127.3

* 6459201: [Extensions] Remove ExtensionSystem::FinishDelayedInstallationIfReady() | 6459201

* 6454796: [Extensions] Move (most) registrar delayed install logic to //extensions | 6454796

* chore: bump chromium in DEPS to 137.0.7128.1

* chore: e patches all

* chore: node ./script/gen-libc++-filenames.js

* [views] Gate DesktopWindowTreeHostWin::window_enlargement_ behind flag

Refs 6428649

* feat: allow opt-out animated_content_sampler.

Refs 6438681

* Trigger CI

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-04-22 15:53:29 -04:00
Charles Kerr
7083419361
refactor: make electron::api::BaseWindow fields private (#46689)
refactor: make electron::api::BaseWindow fields private
2025-04-22 10:19:11 +02:00
Calvin
f15fa56e38
refactor: reduce & remove no-op MicrotasksScope calls (#46681)
* 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/`.
2025-04-19 12:18:03 -05:00
Shelley Vohr
352a403efd
fix: postMessage crash with invalid transferrable (#46639) 2025-04-17 15:09:48 +02:00
Shelley Vohr
51bffb533e
fix: paint and flash issues on macOS (#46615)
* fix: paint and flash issues on macOS

* Adhere to paintWhenInitiallyHidden
2025-04-14 16:29:07 +02:00
Keeley Hammond
a9b2ec514b
fix: fallback to old MacOS context menu behavior if no frame is present (#46595)
* fix: fallback to old MacOS context menu behavior if no frame is present

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>

* docs: add additional option for focusedFrame

* fix: handle frame found, but no view update from rfh

* fix: fix conditional

Co-authored-by: Calvin <clavin@users.noreply.github.com>

---------

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>
Co-authored-by: Calvin <clavin@users.noreply.github.com>
2025-04-11 10:15:35 -04:00
Shelley Vohr
3064b24c9d
refactor: use default printing path when no user options (#46587) 2025-04-11 10:14:29 -04:00
Shelley Vohr
446d0769ed
feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46438)
feat: expose shouldUseDarkColorsForSystemIntegratedUI

Closes https://github.com/electron/electron/issues/46429.
Refs https://github.com/electron/electron/pull/19735.

This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the
`nativeTheme` module. This API returns a boolean indicating whether the
system is using dark colors for system integrated UI elements. This is
useful for applications that want to adapt their UI to match the system
theme, especially for those that use system integrated UI elements like
the shell theme or taskbar appearance.
2025-04-10 12:08:29 +02:00
Shelley Vohr
521108e2a5
fix: crash on parent window close and focur/blur (#46559) 2025-04-09 15:35:30 +02:00
Charles Kerr
636cbc19ac
refactor: simplify some BaseWindow JS getters (#46542)
* refactor: return a std::array<int 2> from BaseWindow::GetMaximumSize()

* refactor: return a std::array<int 2> from BaseWindow::GetMinimumSize()

* refactor: return a std::array<int 2> from BaseWindow::GetPosition()

* refactor: return a std::array<int 2> from BaseWindow::GetSize()

* refactor: return a std::array<int 2> from BaseWindow::GetContentSize()

* refactor: extract helper method ToArray(const gfx::Size)

* refactor: #include correctness
2025-04-08 10:58:12 -05:00
Charles Kerr
4bb7a4ceb0
refactor: make api::View methods const, private (#46545)
* refactor: make api::View::GetBounds() const

* refactor: make api::View::OnViewBoundsChanged() private

refactor: make api::View::OnViewIsDeleting() private

refactor: make api::View::OnChildViewRemoved() private

* refactor: make ChildPair private
2025-04-07 16:23:36 -05:00
Charles Kerr
41d8f90d68
refactor: use base::flat_set in WebContents::DidUpdateFaviconUrl() (#46475)
* refactor: add gin::Converter<std::span>::ToV8()

* feat: add ToV8(const base::flat_set<T>&)

* perf: use a flat_set in WebContents::TitleWasSet()

* refactor: add gin::Converter<std::array>::ToV8()
2025-04-07 10:16:02 +02:00
Charles Kerr
052da50aeb
refactor: remove unused electron::api::App::FileIconCallback (#46490)
refactor: remove electron::api::App::FileIconCallback

last use removed in 2018 by 3f15f516
2025-04-05 00:39:17 -05:00
Charles Kerr
4e33d1690d
refactor: instantiate navigation_entries local variable on the stack (#46453)
* refactor: instantiate navigation_entries on the stack instead of the heap

* refactor: reserve the full size of navigation_entries

* refactor: use emplace_back to simplify the code a little
2025-04-04 16:55:27 -05:00
electron-roller[bot]
9c019b6147
chore: bump chromium to 136.0.7095.0 (main) (#46118)
* chore: bump chromium in DEPS to 136.0.7076.0

* chore: bump chromium in DEPS to 136.0.7077.0

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856

* 6356528: Clean up LegacyRenderWidgetHostHWND code | 6356528

* chore: export patches

* 6339113: [Viewport Segments] Add CDP commands to override Viewport Segments without overriding other device properties. | 6339113

* 6352169: [DevTools][MultiInstance] Support new tab in another window on Android | 6352169

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856

* 6360858:Clickiness: Wire response from URLLoader to DB, add e2e tests| 6360858

* chore: bump chromium in DEPS to 136.0.7079.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7081.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7083.0

* 6361987: Remove double-declaration with gfx::NativeView and gfx::NativeWindow | 6361987

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7087.0

* chore: export patches

* fix: include node patch for missing AtomicsWaitEvent
6385540

* build: add depot_tools python to path

* fix: cppgc init and unregistering v8 isolate

6333562

CppGc is now initialized earlier so Node can skip reinitializing it.

Additionally, gin::IsolateHandle was attempting to destruct an already destructed
v8::Isolate upon electron::JavaScriptEnvironment destruction. By removing the call
to NodePlatform::UnregisterIsolate, this fixes the crash on app shutdown.

* fix: unregister isolate after destruction

See code comment.

* chore: bump chromium in DEPS to 136.0.7095.0

* chore: sync patches

* fix: add script_parsing::ContentScriptType parameter
6298395

* fix: migrate content::BrowserAccessibilityState methods
6401437
6383275

* feat: enableHappyEyeballs option for host resolver
6332599

* fix: add new cookie exclusion reason
6343479

* fix: add new url loader method
6337340

* fix: add new cppgc header file for electron_node headers
6348644

* fix: disable CREL on Linux ARM64
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9

* fixup! fix: add new cppgc header file for electron_node headers 6348644

* chore: update corner smoothing patch

* fixup! chore: update corner smoothing patch

* chore: disable NAN weak tests

These two tests are incompatible with a V8 change that disallows running JS code from a weak finalizer callback.

Ref: 4733273

* test: fix task starvation in node test

A V8 change makes these contexts get collected in a task that is posted
and run asynchronously. The tests were synchronously GC'ing in an
infinite loop, preventing the task loop from running the task that would
GC these contexts.

This change should be upstreamed in some way.

Ref: 4733273

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: clavin <clavin@electronjs.org>
2025-04-03 19:02:49 -05:00
yangllu
e46b0c8ddc
fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8 (#46434)
* fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8

* fix: use CleanedUpAtExit to control the lifetime of GPUInfoManager
2025-04-03 10:12:12 -07:00
Charles Kerr
a21c805ece
perf: avoid redundant call to virtual methods GetProcess() and GetID() (#46409) 2025-04-02 11:57:09 -05:00
Shelley Vohr
9c4720766d
fix: UtilityProcess.fork crash before app ready (#46380)
fix: UtilityProcess.fork crash before app ready
2025-04-01 13:42:03 +02:00
Charles Kerr
fcd836e34f
refactor: remove field unused weak_factory_ (#46363)
refactor: remove unused weak_factory_

Appears to have been added in e3f61b46 but never used
2025-03-31 10:39:21 +02:00
Charles Kerr
ae6930030a
perf: prefer absl::flat_hash_set over std::unordered_set (#46348)
* perf: use absl::flat_hash_set in SpellCheckClient::SpellCheckText()

* perf: use absl::flat_hash_set in MessagePort::DisentanglePorts()
2025-03-30 23:21:18 -05:00
Charles Kerr
2fa4fb0da9
refactor: use v8::String::Empty() when creating empty strings (#46349)
refactor: use v8::String::Empty() when creating empty strings
2025-03-30 21:14:18 -05:00
Samuel Attard
49aba471dc
feat: add support for associating a Menu with a WebFrameMain (#45138)
* feat: add support for associating a Menu with a WebFrameMain

This allows certain OS level features to activate such as Writing Tools, Autofill.. and Services.

There appears to be a bug in macOS where the responder chain isn't traversed if the menu is not popped up using an event, as such we spoof a fake mouse event at the write coordinates in the right window and use that to open the menu.

* build: fix build on non-mac

* build: oops missed a header

* fix: safely handle optional T* by checking nullptr too

* build: fix gn check and build errors

* docs: suggested changes

* feat: default `frame` to `window.webContents.mainFrame` when possible

* fix: avoid deref nullptr view

* Revert "feat: default `frame` to `window.webContents.mainFrame` when possible"

This reverts commit 2e888368199317d67f6ad931a7e9eff0295c4b1b.

* fix: lint

* Remove redundant scoped objects

This code, including the comments, matches almost exactly the behavior of this argument to the function.

* Add ScopedPumpMessagesInPrivateModes patch

* More null pointer safety

---------

Co-authored-by: clavin <clavin@electronjs.org>
2025-03-28 11:50:07 -07:00
Charles Kerr
46b108e9a4
perf: avoid redundant map lookups in GetStorageMask() (#46315)
* perf: avoid a redundant map lookuop in GetStorageMask()

* perf: avoid a redundant map lookup in GetDataTypeMask()
2025-03-28 00:25:25 -05:00
Charles Kerr
35c90fd807
perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost() (#46293)
perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost()
2025-03-27 14:32:01 -05:00
Charles Kerr
3ae285b614
perf: avoid std::map temporaries in WebContents::DevToolsRequestFileSystems() (#46268)
* perf: move the GetDevToolsWebContents() call outside of the loop

* perf: remove std::map temporary in WebContents::DevToolsRequestFileSystems()

* refactor: remove unused GetAddedFileSystemPaths()

* perf: remove std::vector temporary in WebContents::DevToolsRequestFileSystems()
2025-03-26 16:26:56 -05:00
Shelley Vohr
3212f60d69
fix: set userAgent on navigationHistory.restore() (#46260)
fix: set userAgent on navigationHistory restore
2025-03-26 10:59:19 -05:00
Charles Kerr
a5076a663b
perf: avoid redundant map lookup in WebContents::DevToolsIndexPath() (#46254)
perf: avoid double map lookup in WebContents::DevToolsIndexPath()
2025-03-26 10:30:02 -05:00
Charles Kerr
48a38c0289
fix: build failure when printing is disabled (#46283)
fix: ftbfs when printing is disabled
2025-03-26 10:04:39 +01:00
Charles Kerr
6e44662f15
perf: avoid redundant map lookup in WebFrameMain constructor (#46238)
perf: avoid double map lookup in WebFrameMain constructor
2025-03-25 16:53:24 -05:00
Charles Kerr
ced8fdbce8
perf: avoid std::map temporaries in IsDevToolsFileSystemAdded() (#46230)
* refactor: extract-method GetAddedFileSystems()

* refactor: use GetAddedFileSystems() in GetAddedFileSystemPaths()

* refactor: use GetAddedFileSystems() in IsDevToolsFileSystemAdded()
2025-03-25 11:42:58 -05:00
Charles Kerr
4f4e23a3b3
perf: avoid redundant map lookups in GlobalShortcut (#46229)
* perf: avoid redundant map lookup in GlobalShortcut::OnKeyPressed()

* perf: avoid redundant map lookup in GlobalShortcut::ExecuteCommand()
2025-03-25 09:46:03 -05:00
Shelley Vohr
1d6cb348b4
fix: webContents.printToPDF() with cross-process subframes (#46218)
fix: webContents.printToPDF() with cross-process subframes
2025-03-25 08:16:47 -05:00
John Beutner
cf82c3215f
perf: don't wait for thumbnails if they were not requested on macOS (#46138)
When using the SCK thumbnail capturer, the first refresh has the list of
sources, and the second refresh has the thumbnails. If thumbnails are
not needed, only wait for the first refresh.
2025-03-25 12:20:38 +01:00
Robo
a86e44b176
fix: NODE_OPTIONS parsing for child processes on macOS (#46209)
* fix: NODE_OPTIONS parsing for child processes on macOS

* chore: temporarily disable test

* chore: apply review feedback

* chore: fix build
2025-03-25 13:01:37 +09:00
John Beutner
cfd64b5f89
fix: handle OnDelegatedSourceListDismissed asynchronously (#46112)
This fixes a crash with the PipeWire capturer caused by a Chromium
change introduced in
5783826.

DesktopMediaListBase now calls Refresh(true) after dispatching
DesktopMediaListObserver::OnDelegatedSourceListDismissed, so it's
important not to call DesktopCapturer::HandleFailure (which deallocates
the DesktopMediaList) synchronously from OnDelegatedSourceListDismissed.
2025-03-24 20:09:11 +01:00
Shelley Vohr
9ec14b91e7
feat: add BrowserWindow.isSnapped() (#46079)
* feat: add BrowserWindow.isSnapped() on Windows

* docs: mark _Readonly_
2025-03-24 12:09:14 +01:00
Charles Kerr
7ed4f0ca27
perf: use absl::flat_hash_map instead of std::unordered_map (#46202)
* 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
2025-03-24 10:09:14 +01:00
Charles Kerr
5623c96dd7
refactor: remove unused field ServiceWorkerMain::weak_factory_ (#46171)
refactor: remove unused field ServiceWorkerMain::weak_factory_

Added in a467d06, appears to have never been used
2025-03-23 10:14:45 +01:00
Charles Kerr
a81e11d9de
refactor: use = default to define trivial destructors (#46165)
refactor: use '= default' to define trivial destructors
2025-03-21 16:15:34 -05:00
Charles Kerr
6723bfbe32
refactor: reduce coupling in electron::api::Protocol (#46122)
* refactor: decouple api::Protocol from ElectronBrowserContext

now they do not know about each other

* refactor: make electron::api::ProtocolError private

* refactor: remove unused isolate arg in Protocol constructor

* refactor: use =default for trivial destructor
2025-03-21 07:33:25 -05:00
Charles Kerr
c4800d9934
refactor: remove ToV8(isolate, const char*) (#46108) 2025-03-20 10:04:50 +01:00
Shelley Vohr
86cc9f626f
fix: APNS token ids are lowercase ASCII (#46101) 2025-03-20 07:57:50 +01:00
Charles Kerr
4bf99c9bea
refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (#46065)
* refactor: add ElectronBrowserContext::DestroyAllContexts()

Simpler semantics than previous implementation; also hides the
"default context must be destroyed last" implementation detail.

* refactor: add ElectronBrowserContext::GetDefaultBrowserContext()

clearer semantics than everyone calling From("", false)
2025-03-17 08:43:23 -05:00
Charles Kerr
9513486bf3
refactor: use GetDefaultStoragePartition() instead of GetStoragePartition(nullptr) (#46064)
refactor: use GetDefaultStoragePartition()

Use GetDefaultStorageParition() instead of GetStoragePartition(nullptr)

- It improves code uniformity, since we use get-default everywhere else
- It's more readable
- It's marginally faster, since GetStoragePartition() has more steps

Added in 49b0a1bf4a
2025-03-17 08:39:55 -05:00
Sam Maddock
afca4e271e
feat: ServiceWorkerMain.scriptURL (#45863)
feat: serviceWorker.scriptURL
2025-03-14 21:00:13 -04:00
Charles Kerr
30d2fadb28
refactor: replace base::StringPrintf() calls with absl::StrFormat() (#46024)
The former is now a pass-through for the latter and is slated for removal

Xref: https://issues.chromium.org/issues/40241565

4907781
2025-03-14 17:14:32 -05:00
Charles Kerr
3271b82094
refactor: remove unused system header includes (#46015)
* chore: remove unused #include <string>

* chore: remove unused #include <optional>

* chore: remove unused #include <vector>

* chore: remove unused #include <string_view>

* chore: remove unused #include <memory>

* chore: remove unused #include <utility>

* chore: remove unused #include <tuple>

* chore: remove unused #include <unordered_set>

* chore: remove unused #include <functional>

* chore: iwyu <set>

* chore: iwyu <map>
2025-03-14 10:59:15 -05:00