Charles Kerr
2255bb620a
refactor: avoid deprecated v8::Context::GetIsolate()
calls (pt 2) ( #47879 )
...
* 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
2025-07-28 10:22:27 -05:00
Charles Kerr
084c6ef549
refactor: prefer GetCreationContextChecked(v8::Isolate*)
over GetCreationContextChecked()
( #47878 )
...
* 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()
2025-07-25 09:06:57 -05:00
Charles Kerr
39cca586f6
refactor: avoid deprecated v8::Context::GetIsolate()
calls (pt 1) ( #47760 )
...
* refactor: avoid redundant GetIsolate() calls in NodeBindings::CreateEnvironment()
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/6563615
* refactor: use v8::Isolate::GetCurrent() in Initialize() methods
* refactor: add v8::Isolate* arg to NodeBindings::CreateEnvironment()
* fixup! refactor: use v8::Isolate::GetCurrent() in Initialize() methods
* refactor: add v8::Isolate* arg to RendererClientBase::DidCreateScriptContext()
* fixup! refactor: add v8::Isolate* arg to NodeBindings::CreateEnvironment()
* fixup! fixup! refactor: use v8::Isolate::GetCurrent() in Initialize() methods
refactor: prefer JavascriptEnvironment::GetIsolate() in the browser layer
2025-07-21 16:34:38 +02:00
Calvin
389927dce8
fix: corner smoothing feature gate crash ( #47759 )
...
* fix: corner smoothing feature gate crash
* Fix ElectronCornerSmoothing::CSSValueFromComputedStyleInternal
2025-07-16 08:39:17 -07:00
Shelley Vohr
09ab71de43
fix: deprecation warning crash when no Node.js environment available ( #47700 )
2025-07-16 12:45:59 +02:00
electron-roller[bot]
603cafad7e
chore: bump chromium to 140.0.7281.0 (main) ( #47616 )
...
* chore: bump chromium in DEPS to 140.0.7269.2
* chore: bump chromium in DEPS to 140.0.7270.0
* chore: bump chromium in DEPS to 140.0.7271.0
* chore: bump chromium in DEPS to 140.0.7273.0
* 6516731: [ExclusiveAccessForAndroid] remove unneeded includes & deps | https://chromium-review.googlesource.com/c/chromium/src/+/6516731
* 6694809: dbus: Ensure systemd scope is started before using any portal services | https://chromium-review.googlesource.com/c/chromium/src/+/6694809
* chore: patch chromium
* chore: export patches
* chore: bump chromium in DEPS to 140.0.7275.0
* 6677511: [pepper] More pepper removal | https://chromium-review.googlesource.com/c/chromium/src/+/6677511
* 6513641: [gin] Rename gin::Wrappable to gin::DeprecatedWrappable | https://chromium-review.googlesource.com/c/chromium/src/+/6513641
* chore: export chromium patches
* 6513641: [gin] Rename gin::Wrappable to gin::DeprecatedWrappable | https://chromium-review.googlesource.com/c/chromium/src/+/6513641
* chore: bump chromium in DEPS to 140.0.7277.0
* chore: bump chromium in DEPS to 140.0.7279.0
* chore: bump chromium in DEPS to 140.0.7281.0
* 6677314: Plumb enabled client hints in the network requestion to network layer
https://chromium-review.googlesource.com/c/chromium/src/+/6677314
* 6351556: [source-phase-imports] Support Wasm Source Phase Imports
https://chromium-review.googlesource.com/c/chromium/src/+/6351556
* 6700077: [renderer] Avoid calls to deprecated GetIsolate methods
https://chromium-review.googlesource.com/c/chromium/src/+/6700077
* 6692873: Reland "Reland "FSA: Only normalize the hardcoded rules once during initialization""
https://chromium-review.googlesource.com/c/chromium/src/+/6692873
* 6686234: [gin] Cleanup NamedPropertyInterceptor for Wrappable
https://chromium-review.googlesource.com/c/chromium/src/+/6686234
* chore: export patches
* 6667723: Remove content_enable_legacy_ipc GN arg.
https://chromium-review.googlesource.com/c/chromium/src/+/6667723
* 6646566: ui: Move NativeWindowTracker to its own directory
https://chromium-review.googlesource.com/c/chromium/src/+/6646566
* fix: add missing includes
* 6580522: [WAR, DNR] Fix unsafe redirect error to web accessible resource
https://chromium-review.googlesource.com/c/chromium/src/+/6580522
* 6680477: Implement `completeCode` endpoint and expose to DevTools
https://chromium-review.googlesource.com/c/chromium/src/+/6680477
* 6677511: [pepper] More pepper removal
https://chromium-review.googlesource.com/c/chromium/src/+/6677511
* 6696689: Rename views::WidgetFocusManager -> NativeViewFocusManager
https://chromium-review.googlesource.com/c/chromium/src/+/6696689
* 6702812: Move wtf/text/string_impl*.* to "blink" namespace
https://chromium-review.googlesource.com/c/chromium/src/+/6702812
* chore: fix dialog patch
* 6702431: [animation-trigger] Parse timeline-trigger-name
https://chromium-review.googlesource.com/c/chromium/src/+/6702431
* chore: fixup patch indices
* feat: replace webFrame.routingId with webFrame.frameToken
* feat: WebFrameMain.prototype.frameToken
* test: refactor to use replacement APIs
* chore: fixup pip patch
* test: adjust webFrame tests for frameToken changes
* 6703757: Reland "Enable -fsanitize=array-bounds in non-UBSan builds"
https://chromium-review.googlesource.com/c/chromium/src/+/6703757
* test: switch to frameTokens
* test: routingId is fine to test in the main process
* docs: add routingId to breaking changes
* docs: update plugin-crashed event
* chore: fixup linux dialog patch
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-07-14 13:42:37 -07:00
Shelley Vohr
fbb83be785
refactor: use dbus_thread_linux::GetSharedSessionBus()
( #47685 )
...
refactor: use dbus_thread_linux::GetSharedSessionBus()
2025-07-10 10:17:34 +02:00
Shelley Vohr
31bc5ca903
fix: default to system accent color on invalid user color ( #47660 )
...
fix: default to system accent color on invalid user color"
2025-07-08 11:15:13 +02:00
Charles Kerr
bc585b6a3f
refactor: avoid a few unnecessary strings ( #47644 )
...
* perf: replace string temporary with string_view in GetXdgAppId()
* perf: replace string temporary with string_view in ToV8(WindowOpenDisposition)
* perf: replace string temporary with string_view in ToV8(electron::api::WebContents::Type)
2025-07-03 11:08:59 -05:00
reito
fb0b77b731
feat: add ColorSpace
( #47314 )
2025-07-02 00:09:09 -07:00
Charles Kerr
f50ad3d022
refactor: remove stray .c_str()
calls for absl::StrFormat()
( #47548 )
...
refactor: remove stray .c_str() calls for absl::StrFormat()
StrFormat() understands std::string, std::string_view
2025-06-26 11:41:30 +02:00
electron-roller[bot]
035879357e
chore: bump chromium to 139.0.7256.0 (main) ( #47481 )
...
* chore: bump chromium in DEPS to 139.0.7242.0
* chore: update render_widget_host_view_mac.patch
no code changes; just updating patch context
Do a cleanup pass on the history swiper code | https://chromium-review.googlesource.com/c/chromium/src/+/6604367
* chore: update mas_avoid_private_macos_api_usage.patch.patch
no code changes; just updating patch context
[tracing] Delete base/trace_event/base_tracing.h | https://chromium-review.googlesource.com/c/chromium/src/+/6624012
* chore: update chore_provide_iswebcontentscreationoverridden_with_full_params.patch
no manual changes; just updating patch context
[ActorFramework] Refactor Actor Task Management | https://chromium-review.googlesource.com/c/chromium/src/+/6618684
* chore: update fix_move_autopipsettingshelper_behind_branding_buildflag.patch
[pip] Tuck picture-in-picture windows when a file dialog is open | https://chromium-review.googlesource.com/c/chromium/src/+/6449682
Reland "[document pip] Restrict the size that a website can request" | https://chromium-review.googlesource.com/c/chromium/src/+/6372104
* chore: update feat_corner_smoothing_css_rule_and_blink_painting.patch
Xref: corner-shape: constraint radii based on opposite corner overlap | https://chromium-review.googlesource.com/c/chromium/src/+/6592572
* chore: update revert_code_health_clean_up_stale_macwebcontentsocclusion.patch
no manual changes; just updating patch context
* chore: update fix_rename_sqlite_win32_exports_to_avoid_conflicts_with_node_js.patch
no code changes; just updating patch context
* chore: e patches all
* Plumb Verify2QwacBinding and hook it up in QwacWebContentsObserver
https://chromium-review.googlesource.com/c/chromium/src/+/6624719
* [Extensions] Remove host delegate OnMainFrameCreatedForBackgroundPage
https://chromium-review.googlesource.com/c/chromium/src/+/6631123
* Extensions: Rename GetResourceURL to ResolveExtensionURL
https://chromium-review.googlesource.com/c/chromium/src/+/6625053
* [NonClientFrameView] Consolidate NativeFrameViewMac
https://chromium-review.googlesource.com/c/chromium/src/+/6614239
* ICWYU
* [views-ax] Remove dead code WidgetAXTreeIDMap
https://chromium-review.googlesource.com/c/chromium/src/+/6619701
* Reland "extensions: Add `WillPrepareForEvaluation` to setup MojoJS"
https://chromium-review.googlesource.com/c/chromium/src/+/6630056
* NavigationThrottleRunner2: Remove MaybeAddThrottle
https://chromium-review.googlesource.com/c/chromium/src/+/6628079
* [pip] Tuck picture-in-picture windows when a file dialog is open
https://chromium-review.googlesource.com/c/chromium/src/+/6449682
* build: fix snapshot_blob.bin build error
xref: https://issues.chromium.org/issues/416540976
* chore: e patches all
* build: freeup disk space on macos
* chore: bump chromium in DEPS to 139.0.7244.0
* chore: update printing.patch
no manual changes; just updating patch context
* chore: remove upstreamed ignore_parse_errors_for_resolveshortcutproperties.patch
Prevent Windows crash on unexpected shortcut type | https://chromium-review.googlesource.com/c/chromium/src/+/6633298
* chore: e patches all
* Revert "Reland "extensions: Add `WillPrepareForEvaluation` to setup MojoJS""
This reverts commit 77c4f967a637f7e8970114f91311f9fddede0f7c.
Revert CL for the high confidence crash culprit for http://crash/28f897bb9743dfe0 | https://chromium-review.googlesource.com/c/chromium/src/+/6641819
* Fix spec's expected base64-encoded PNG strings to match upstream changes.
[rust png] Enable by default. | https://chromium-review.googlesource.com/c/chromium/src/+/6085801
* chore: bump chromium in DEPS to 139.0.7246.0
* chore: e patches all
* chore: bump chromium in DEPS to 139.0.7248.0
* chore: update patches
* siso: Enable Siso by default for non-Google builds
https://chromium-review.googlesource.com/c/chromium/src/+/6638830
Disabling for now until we are ready to build siso on all platforms.
* Revert "revert Don't use static variable for UseExternalPopupMenus"
This reverts commit e91e3894e6c34cc0ffe69ed45417c0ebec882fb1.
* Update mac_sdk_min to match minimum required SDK version
https://chromium-review.googlesource.com/c/chromium/src/+/6493969
(cherry picked from commit 3e7cbe912d8fe1062d68ed06968aaee22013985f)
* [video pip] Use default window styling on Mac
https://chromium-review.googlesource.com/c/chromium/src/+/6648665
* Reland "Force the unintentional renderer process creation check by default"
https://chromium-review.googlesource.com/c/chromium/src/+/6626905
* fixup: Reland "Force the unintentional renderer process creation check by default
https://chromium-review.googlesource.com/c/chromium/src/+/6626905
* chore: bump chromium in DEPS to 139.0.7249.0
* fixup: Reland "Force the unintentional renderer process creation check by default
https://chromium-review.googlesource.com/c/chromium/src/+/6626905
* chore: update patches
* chore: bump chromium in DEPS to 139.0.7250.0
* chore: bump chromium in DEPS to 139.0.7252.0
* chore: bump chromium in DEPS to 139.0.7254.0
* 6638187: browser level TOCTOU check for coordinate target
https://chromium-review.googlesource.com/c/chromium/src/+/6638187
* chore: fixup patch indices
* chore: add missing base/notimplemented includes
* 6652910: [Frame Cleanup] Push down/hide implementation-specific API
https://chromium-review.googlesource.com/c/chromium/src/+/6652910
* chore: bump chromium in DEPS to 139.0.7256.0
* chore: fix lint
* fixup! 6652910: [Frame Cleanup] Push down/hide implementation-specific API
* fix: move HandleScope location
* chore: bump chromium in DEPS to 139.0.7258.0
* fixup! [NonClientFrameView] Consolidate NativeFrameViewMac
* Revert "chore: bump chromium in DEPS to 139.0.7258.0"
This reverts commit 264b2e934f4b2705c47d9761010052b95d9dd5de.
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-06-26 00:12:49 +09:00
Shelley Vohr
3e8e87d186
feat: support customizing window accent color on Windows ( #47285 )
2025-06-24 14:43:02 +02:00
Robo
c964296ec3
feat: add support for --no-experimental-global-navigator ( #47370 )
...
chore: add support for --no-experimental-global-navigator
2025-06-09 14:57:27 +09:00
Shelley Vohr
fbb3fa7503
feat: allow intercepting mouse events ( #47280 )
...
* feat: allow intercepting mouse events
* test: add specs
* Update spec/api-web-contents-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
---------
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-06-04 14:10:33 +02:00
electron-roller[bot]
53fd879043
chore: bump chromium to 138.0.7190.0 (main) ( #47107 )
...
* chore: bump chromium in DEPS to 138.0.7180.0
* 6546797: Add a metric for the overall success of the "safe storage" item retrieval.
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6546797
* 6548078: extensions: Fix TODO in ScriptInjectionTracker for desktop Android
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6548078
* 6544950: Revert "FSA: Only normalize the hardcoded rules once during initialization"
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6544950
* chore: bump chromium in DEPS to 138.0.7181.0
* chore: update patches
* fix: correctly clamp HSL shift values between 0 and 1
* chore: bump DEPS to 138.0.7183.0
* 6553142: Remove SelectFileDialogLinuxKde | https://chromium-review.googlesource.com/c/chromium/src/+/6553142
* chore: update patches
* chore: bump chromium in DEPS to 138.0.7184.0
* chore: bump chromium in DEPS to 138.0.7186.0
* chore: bump chromium in DEPS to 138.0.7190.0
* chore: update patches
* 6547778: Remove some superfluous //ui/gfx includes from //chrome headers | https://chromium-review.googlesource.com/c/chromium/src/+/6547778
* 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | https://chromium-review.googlesource.com/c/chromium/src/+/6556022
* fix: remove pdf_extension_util::AddAdditionalData
https://chromium-review.googlesource.com/c/chromium/src/+/4099130
This was removed 2 years ago in Chrome.
* fix: provide BrowserContext to pdf_extension_util::AddAdditionalData
https://chromium-review.googlesource.com/c/chromium/src/+/6558173
* fixup! 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | https://chromium-review.googlesource.com/c/chromium/src/+/6556022
* fix: pass in navigation throttle registry
https://chromium-review.googlesource.com/c/chromium/src/+/6536175
* fixup! 6556022: Reland "FSA: Only normalize the hardcoded rules once during initialization" | https://chromium-review.googlesource.com/c/chromium/src/+/6556022
This partially reverts commit 20d709dd15ba0ff332e24ee314149d642dc5d47c.
* 6545984: corner-shape: render dashed & dotted borders
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6545984
* Update corner smoothing expected images
* Apply "future" revert commit to fix windows build
> Reason for revert: Multiple eng reporting that this is causing build failures due to too-long pathnames, with no immediate feasible workaround
This issue also affects our CI builds.
Problematic CL in current roll: 6494836: [webgl] Add stub WebGL[2]RenderingContextWebGPU | https://chromium-review.googlesource.com/c/chromium/src/+/6494836
"Future" revert CL: 6565622: Revert "[webgl] Add stub WebGL[2]RenderingContextWebGPU" | https://chromium-review.googlesource.com/c/chromium/src/+/6565622
This patch should automatically disappear when we roll the revert.
* 6533919: win: don't add WS_CAPTION style to popup windows
https://chromium-review.googlesource.com/c/chromium/src/+/6533919
This mirrors the change made earlier to the code ours is based on: 6374074: [headless] Provide headless aware window metrics on Windows | https://chromium-review.googlesource.com/c/chromium/src/+/6374074
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-06-03 11:19:20 -04:00
electron-roller[bot]
82a59d9894
chore: bump node to v22.16.0 (main) ( #47217 )
...
* chore: bump node in DEPS to v22.16.0
* crypto: remove BoringSSL dh-primes addition
https://github.com/nodejs/node/pull/57023
* tools: enable linter in test/fixtures/test\-runner/output
https://github.com/nodejs/node/pull/57698
* src: improve thread safety of TaskQueue
https://github.com/nodejs/node/pull/57910
* buffer: define global v8::CFunction objects as const
https://github.com/nodejs/node/pull/57676
* src: disable abseil deadlock detection
https://github.com/nodejs/node/pull/57582
* zlib: fix pointer alignment
https://github.com/nodejs/node/pull/57727
* chore: fixup patch indices
* src: set default config as node.config.json
https://github.com/nodejs/node/pull/57171
* src: update std::vector<v8::Local<T>> to use v8::LocalVector<T>
https://github.com/nodejs/node/pull/57578
* test: disable chmod tests failing in Docker
https://github.com/nodejs/node/issues/58326
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-02 17:30:15 -04:00
zeeker999
dc5efca0f6
feat: [net] add "priority" option to net.request ( #42628 )
...
document the default value of priority option
Update the priority test to not use the httpbin.org as server
Fixed the lint errors
Fixed the build error
2025-05-30 15:28:13 -04:00
Charles Kerr
a7a3e10300
refactor: prefer base::circular_deque
over std::deque
( #47171 )
...
* refactor: use base::circular_deque in ResolveProxyHelper
* refactor: use base::circular_deque in GetExtraCrashKeys()
refactor: reduce visibility of kMaxCrashKeyValueSize
This change is to match Chromium's usage advice from
base/containers/README.md: `base:circular_deque` is preferred over
`std::deque` to provide consistent performance across platforms.
2025-05-21 12:04:36 -05:00
reito
263c76df09
fix: prevent gc monitor 2nd pass crash ( #46987 )
2025-05-20 22:54:03 +09:00
Calvin
5dd6481e53
fix: explicit microtask scope DCHECK condition ( #47134 )
2025-05-19 12:08:59 +09:00
Charles Kerr
d720aea700
refactor: make TrackableObject::weak_map_id() constexpr ( #47092 )
...
* refactor: make TrackableObject::weak_map_id() constexpr
refactor: make BaseWindow::GetID() inline and constexpr
* refactor: make NativeWindow::window_id() constexpr too
2025-05-15 16:10:33 -05:00
electron-roller[bot]
883f48b9b4
chore: bump chromium to 138.0.7178.0 (main) ( #47086 )
...
* chore: bump chromium in DEPS to 138.0.7178.0
* 6351556: [source-phase-imports] Support Wasm Source Phase Imports
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6351556
* chore: update patches
* 6509682: extensions: Use ChromeExtensionsBrowserClient on desktop Android, part 2
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6509682
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-15 12:47:07 -05:00
Michaela Laurencin
b9f0aebb2f
feat: enable innerWidth and innerHeight for window open ( #46749 )
...
* feat: enable innerWidth and innerHeight for window open
* update comment for added special innerWidth and innerHeight
* update 100 min spec requirement handling
* update testing to include getContentSize
* update macOS min requirement handling
* adjust refactored consts
* update const values from nativewindowviews
2025-05-09 12:03:45 -04:00
Aman Karmani
376634c75a
feat: add support for --experimental-network-inspection
( #46690 )
...
* feat: add support for `--experimental-network-inspection`
* docs: fix minor formatting issues
visible on both GH[1] and the docs site[2]
[1] https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#nodejs-flags
[2] https://www.electronjs.org/docs/latest/api/command-line-switches#--inspect-brkhostport
* docs: add entry for new nodejs flag
2025-05-09 09:44:14 -04:00
Charles Kerr
2cbd968da5
refactor: use gin_helper::Dictionary::ValueOrDefault()
( #46982 )
...
* refactor: use ValueOrDefault() in electron_api_web_contents.cc
* refactor: use ValueOrDefault() in electron_api_url_loader.cc
* refactor: use ValueOrDefault() in electron_download_manager_delegate.cc
* refactor: use ValueOrDefault() in electron_touch_bar.mm
* refactor: use ValueOrDefault() in electron_url_loader_factory.cc
* refactor: use ValueOrDefault() in electron_browser_context.cc
* refactor: use ValueOrDefault() in electron_touch_bar.mm
* refactor: use ValueOrDefault() in blink_converter.cc
* feat: add ValueOrDefault() to PersistentDictionary
* empty commit
* refactor: use ValueOrDefault() in blink_converter.cc
* refactor: inline the rectangle base::Value::Dict
* refactor: remove has_scroll temporary
---------
Co-authored-by: Deepak Mohan <hop2deep@gmail.com>
2025-05-08 14:17:22 -05:00
Calvin
580fa57a29
refactor: Node.js temporary "explicit" microtask policy scope pattern ( #46973 )
...
refactor: Node.js explicit microtask scope pattern
2025-05-08 10:21:39 +09:00
Calvin
37639b5400
refactor: replace gin_helper::MicrotasksScope
with v8::MicrotasksScope
( #46963 )
...
* 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]: https://github.com/electron/electron/pull/29058/commits/a4ea80dd47b1f13e10e218d298e70d6dd6b4fd0a#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
2025-05-07 14:10:34 -05:00
Charles Kerr
b7ae162716
refactor: add gin_helper::Dictionary::ValueOrDefault()
( #46939 )
...
* feat: add gin_helper::Dictionary::ValueOrDefault()
A convenience function for using a default value if the
specified key isn't present in the dictionary.
* refactor: use ValueOrDefault() in native_window.cc
* refactor: use ValueOrDefault() in native_window_mac.mm
* refactor: use ValueOrDefault() in native_window_views.cc
* refactor: use ValueOrDefault() in electron_api_native_image.cc
2025-05-06 15:20:12 -05:00
Charles Kerr
8308ac29c8
refactor: pass gfx::ResizeEdge
by value ( #46935 )
...
refactor: pass gfx::ResizeEdge by value
It is an enum class, so no reason to pass by reference
2025-05-06 11:57:53 -05: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
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
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
electron-roller[bot]
f2240e07f0
chore: bump chromium to 137.0.7149.0 (main) ( #46777 )
...
* chore: bump chromium in DEPS to 137.0.7144.0
* chore: bump chromium in DEPS to 137.0.7145.0
* chore: bump chromium in DEPS to 137.0.7147.0
* chore: update patches
* Remove deprecated GetVar(std::string_view, std::string*) overload
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6468873
* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload
* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload
* chore: bump chromium in DEPS to 137.0.7149.0
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-04-28 11:39:12 -04:00
Charles Kerr
c2ab63f6d7
refactor: use absl::InlinedVector
in ToV8(ElectronPermissionManager)
( #44854 )
...
perf: use a stack-allocated string_view array in ToV8(USBProtectedClasses)
2025-04-25 16:11:15 -05:00
Evan Simkowitz
8fa7d324d1
fix: set XDG_CURRENT_DESKTOP
env var back to original value before invoking xdg utils ( #45310 )
...
* Fix XDG_CURRENT_DESKTOP before invoking XDGUtil
* apply suggestion
* use existing XDG_CURRENT_DESKTOP const
2025-04-25 11:31:36 -05:00
Charles Kerr
06a99d6770
refactor: make node Buffers more friendly to base::span
/ std::span
( #46724 )
...
* refactor: add electron::Buffer namespace; move the Buffer as_byte_span() into it
* feat: add electron::Buffer::Copy()
a span-friendly version of node::Buffer::Copy()
* refactor: use electron::Buffer::Copy() in electron_api_base_window.cc
* refactor: use electron::Buffer::Copy() in electron_api_data_pipe_holder.cc
* refactor: use electron::Buffer::Copy() in electron_api_safe_storage.cc
* refactor: use electron::Buffer::Copy() in electron_api_clipboard.cc
* refactor: use electron::Buffer::Copy() in osr_converter.cc
* refactor: use electron::Buffer::Copy() in electron_api_native_image.cc
* refactor: use electron::Buffer::Copy() in net_converter.cc
* refactor: use electron::Buffer::Copy() in electron_api_web_contents.cc
* refactor: make NewEmptyBuffer() return a Local<Value>
2025-04-25 08:00:09 -05:00
electron-roller[bot]
08b7a1f801
chore: bump chromium to 137.0.7141.0 (main) ( #46725 )
...
* chore: bump chromium in DEPS to 137.0.7139.0
* chore: bump chromium in DEPS to 137.0.7141.0
* chore: update patches
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6474596
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6443472
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6471184
* [ServiceWorker] Pipe is_for_service_worker into OverrideURLLoaderFactoryParams
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6459481
* Reland "[PermissionOptions] Use PermissionDescriptorPtr in PermissionControllerDelegate"
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6455975
* clickiness: Check attestation and user settings on origins
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6356796
* extensions : Move ReloadExtension from ExtensionService
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6472812
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6472777
* fixup! Update AppleKeychain API to be friendlier
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6443472
* chore: script/gen-libc++-filenames.js
* Rename ColorVariant::CovertToSkColor() to ColorVariant::ResolveToSkColor()
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6373793
* [headless] Provide headless aware window metrics on Windows
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6374074
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-04-24 17:18:38 +09:00
Charles Kerr
686ae47696
refactor: remove redundant NativeImage::GetBitmap() ( #46696 )
...
* refactor: remove redundant NativeImage::GetBitmap()
* docs: mark NativeImage.getBitmap() as deprecated
* have getBitmap() emit a deprecation warning
* docs: update obsolete refefence to getBitmap()
* test: update obsolete refefences to getBitmap()
---------
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-04-23 11:00:43 +02: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 | https://chromium-review.googlesource.com/c/chromium/src/+/6384240
* 6422872: Remove unused includes in isolation_info_mojom_traits.h | https://chromium-review.googlesource.com/c/chromium/src/+/6422872
* chore: update patches
* 6400733: Avoid ipc_message_macros.h usage in some foo_param_traits_macros.h files | https://chromium-review.googlesource.com/c/chromium/src/+/6400733
* chore: update patches
* 6423410: Enable unsafe buffer warnings for chromium, try #3 . | https://chromium-review.googlesource.com/c/chromium/src/+/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 . | https://chromium-review.googlesource.com/c/chromium/src/+/6423410
remove all uses of:
- strcmp()
* fixup! 6423410: Enable unsafe buffer warnings for chromium, try #3 . | https://chromium-review.googlesource.com/c/chromium/src/+/6423410
* 6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | https://chromium-review.googlesource.com/c/chromium/src/+/6433203
* chore: bump chromium in DEPS to 137.0.7115.0
* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077
* chore: update patches
* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077
* fix: add pragma for MacSDK unsafe buffers | 6423410: Enable unsafe buffer warnings for chromium, try #3 . | https://chromium-review.googlesource.com/c/chromium/src/+/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. | https://chromium-review.googlesource.com/c/chromium/src/+/6431756
* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077
* 6428345: Remove ExtensionService usage from ChromeExtensionRegistrarDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/6428345
* 6384315: Migrate extensions_enabled from ExtensionService to Registrar | https://chromium-review.googlesource.com/c/chromium/src/+/6384315
* 6428749: [extensions] Refactor ExtensionService for AddNewAndUpdateExtension. | https://chromium-review.googlesource.com/c/chromium/src/+/6428749
* chore: bump chromium in DEPS to 137.0.7119.0
* 6440290: corner-shape: support inset shadow | https://chromium-review.googlesource.com/c/chromium/src/+/6440290
* 6429230: FSA: Move blocked paths to the PermissionContext class | https://chromium-review.googlesource.com/c/chromium/src/+/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 | https://chromium-review.googlesource.com/c/chromium/src/+/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() | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
* chore: update feat_corner_smoothing_css_rule_and_blink_painting.patch
corner-shape: support inset shadow | https://chromium-review.googlesource.com/c/chromium/src/+/6440290
* refactor: grandfather in AutofillPopupView as a subclass of WidgetDelegateView
Add a PassKey for std::make_unique<WidgetDelegateView>() | https://chromium-review.googlesource.com/c/chromium/src/+/6442265
* Provide dbus appmenu information on Wayland | https://chromium-review.googlesource.com/c/chromium/src/+/6405535
* [extensions] Move OnExtensionInstalled out of ExtensionService. | https://chromium-review.googlesource.com/c/chromium/src/+/6443325
* refactor: grandfather in NativeWindowViews for delete callbacks
6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | https://chromium-review.googlesource.com/c/chromium/src/+/6433203
* chore: merge the four "grandfather" patches into one
* [A11yPerformance] Remove IsAccessibilityAllowed() | 6404386: [A11yPerformance] Remove IsAccessibilityAllowed() | https://chromium-review.googlesource.com/c/chromium/src/+/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 | https://chromium-review.googlesource.com/c/chromium/src/+/6420753
* 6429573: [accessibility] Move mode change out of AccessibilityNotificationWaiter | https://chromium-review.googlesource.com/c/chromium/src/+/6429573
* chore: e patches all
* 6419936: [win] Change ScreenWin public static methods to virtual | https://chromium-review.googlesource.com/c/chromium/src/+/6419936
* 6423410: Enable unsafe buffer warnings for chromium, try #3 . | https://chromium-review.googlesource.com/c/chromium/src/+/6423410
remove all uses of:
- fprintf()
- fputs()
- snprintf()
- vsnprintf()
* fix: size conversion FTBFS on Win
* 6423410: Enable unsafe buffer warnings for chromium, try #3 . | https://chromium-review.googlesource.com/c/chromium/src/+/6423410
remove all uses of:
- wcscpy_s()
* 6423410: Enable unsafe buffer warnings for chromium, try #3 . | https://chromium-review.googlesource.com/c/chromium/src/+/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 | https://chromium-review.googlesource.com/c/chromium/src/+/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 | https://chromium-review.googlesource.com/c/chromium/src/+/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() | https://chromium-review.googlesource.com/c/chromium/src/+/6459201
* 6454796: [Extensions] Move (most) registrar delayed install logic to //extensions | https://chromium-review.googlesource.com/c/chromium/src/+/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 https://chromium-review.googlesource.com/c/chromium/src/+/6428649
* feat: allow opt-out animated_content_sampler.
Refs https://chromium-review.googlesource.com/c/chromium/src/+/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
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
Calvin
3a982ecad5
fix: do not run microtasks in V8Serializer in browser process ( #46668 )
2025-04-19 11:43:02 +09: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
Shelley Vohr
3064b24c9d
refactor: use default printing path when no user options ( #46587 )
2025-04-11 10:14:29 -04:00
Charles Kerr
ab23758e51
refactor: use v8::True(isolate) and v8::False(isolate) ( #46544 )
2025-04-08 12:58:39 -05: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
b1731407bc
refactor: make TrackableObjectBase::weak_map_id_
const ( #46524 )
...
refactor: make TrackableObjectBase::weak_map_id_ const
simplify declaration and initialization
2025-04-07 20:49:05 -05:00
Charles Kerr
c0fdf09f28
perf: on Windows, make Archive::HeaderIntegrity()
faster ( #46509 )
...
* perf: do not clone the map each time we call Archive::HeaderIntegrity()
* perf: use absl::flat_hash_map for the integrity cache
* perf: do not clone the JSON payload string
* perf: preallocate capacity for the integrity cache
* perf: use move variant of insert_or_assign()
* refactor: simplify integrity cache building
remove unnecessary std::optional<>
* refactor: use base::FindOrNull()
* refactor: remove unused #includes
* refactor: make variable types explicit
* fix: make res_size unsigned
* refactor: put GetIntegrityConfigCache() in an unnamed namespace
refator: put LoadIntegrityConfig() in an unnamed namespace
* fix: oops, missing rel_path_utf8 key
* fix: oops, fix Wunreachable-code-return
2025-04-07 11:10:29 +02:00