chore: bump chromium to 154.0.8035.0 (main) (#53292)

* chore: bump chromium in DEPS to 154.0.8030.0

* chore: bump chromium in DEPS to 154.0.8031.0

* chore: bump chromium in DEPS to 154.0.8033.0

* chore: bump chromium in DEPS to 154.0.8035.0

* 8313127: Reland "[dcheck-to-check] Convert DCHECKs in content/browser/ [1/n]"

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 8275653: generate_resource_allowlist: scan pdb again

Upstream restructured ExpandThinArchives() to filter non-archive paths
early; re-applied the branch that keeps regular archives (and Mach-O
universal archives) in the scan list onto the new structure.

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 8305512: Reland "[content] Register the spare RenderProcessHost before Init()"

Our fix_register_the_spare_renderer_before_initializing_it.patch was
upstreamed and has landed, so remove the now-redundant patch.

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches

* 8298972: Reland "[hp] Delete memlog code"

Chromium removed the out-of-process heap profiler (memlog) along with
its export of heap dumps into MemoryInfra traces, and there is no
equivalent replacement reachable from the TracingController API.
Removed the ProfilingClient binder and the
//components/heap_profiling/multi_process dependency, and made
contentTracing.enableHeapProfiling() reject with an explanatory error.
Docs and specs updated to match.

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GitHub Copilot (GPT-5.3-Codex) <175728472+Copilot@users.noreply.github.com>
Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 8280498: [AI Telemetry] Unify ResponseTokens and latency metrics in Blink

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GitHub Copilot (GPT-5.3-Codex) <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-08-31 11:50:02 -07:00
1 parent aad510ddac
commit 355f0fa1f0
56 files changed
+172 -663

No files matched your search

-1
View File
@@ -525,7 +525,6 @@ source_set("electron_lib") {
"//components/certificate_transparency",
"//components/compose:buildflags",
"//components/embedder_support:user_agent",
"//components/heap_profiling/multi_process",
"//components/input",
"//components/language/core/browser",
"//components/memory_system",
+1 -1
View File
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'154.0.8029.0',
'154.0.8035.0',
'node_version':
'v24.20.0',
'nan_version':
-61
View File
@@ -124,65 +124,4 @@ Returns `Promise<Object>` - Resolves with an object containing the `value` and `
Get the maximum usage across processes of trace buffer as a percentage of the
full state.
### `contentTracing.enableHeapProfiling([options])` _Experimental_
<!--
```YAML history
added:
- pr-url: https://github.com/electron/electron/pull/50826
```
-->
* `options` ([EnableHeapProfilingOptions](structures/enable-heap-profiling-options.md)) (optional)
Returns `Promise<void>` - Resolves once heap profiling has been enabled.
Enable [heap profiling](https://chromium.googlesource.com/chromium/src/+/lkgr/docs/memory-infra/heap_profiler.md)
for MemoryInfra traces. Equivalent to the `--memlog` switch in Chrome.
Only takes effect if the `disabled-by-default-memory-infra` category is included.
Needs to be called before `contentTracing.startRecording()`.
Usage:
```js
const { contentTracing } = require('electron')
async function recordTrace () {
await contentTracing.enableHeapProfiling()
await contentTracing.startRecording({
included_categories: ['disabled-by-default-memory-infra'],
excluded_categories: ['*'],
memory_dump_config: {
triggers: [
{ mode: 'detailed', periodic_interval_ms: 1000 }
]
}
})
await new Promise(resolve => setTimeout(resolve, 5000))
const filePath = await contentTracing.stopRecording()
}
```
To view the recorded heap dumps:
1. Download the breakpad symbols for your Electron version from the Electron GitHub
[releases](https://github.com/electron/electron/releases)
2. Clone the [Electron source code](../development/build-instructions-gn.md)
3. In your Chromium checkout for Electron, run this command to symbolicate the heap dump:
```bash
python3 third_party/catapult/tracing/bin/symbolize_trace --use-breakpad-symbols --breakpad-symbols-directory /path/to/breakpad_symbols /path/to/trace.json
```
4. Open the symbolicated trace in `chrome://tracing` (the Perfetto UI does not support memory dumps
yet)
5. Click on one of the `M` symbols
6. Click on a `☰` triple bar icon (e.g., in the `malloc` column)
![Screenshot showing how to view a heapdump in Chromium's tracing view](../images/viewing-heap-dumps.png)
[trace viewer]: https://chromium.googlesource.com/catapult/+/HEAD/tracing/README.md
@@ -1,26 +0,0 @@
# EnableHeapProfilingOptions Object
* `mode` string (optional) - Controls which processes are profiled. Equivalent to `--memlog` in
Chrome. Default is `all`.
* `all` - Profile all processes.
* `browser` - Profile only the browser process.
* `gpu` - Profile only the GPU process.
* `minimal` - Profile only the browser and GPU processes.
* `renderer-sampling` - Profile at most 1 renderer process. Each renderer process has a fixed
probability of being profiled when the renderer process is started or, for existing processes,
when heap profiling is enabled.
* `all-renderers` - Profile all renderer processes.
* `utility-sampling` - Each utility process has a fixed probability of being profiled.
* `all-utilities` - Profile all utility processes.
* `utility-and-browser` - Profile all utility processes and the browser process.
* `samplingRate` number (optional) - Controls the sampling interval in bytes. The lower the
interval, the more precise the profile is. However it comes at the cost of performance. Default
is `100000` (100KB). That is enough to observe allocation sites that make allocations >500KB
total, where total equals to a single allocation size times the number of such allocations at the
same call site. Equivalent to `--memlog-sampling-rate` in Chrome. Must be an integer between
`1000` and `10000000`.
* `stackMode` string (optional) - Controls the type of metadata recorded for each allocation.
Equivalent to `--memlog-stack-mode` in Chrome. Default is `native`.
* `native` - Instruction addresses from unwinding the stack.
* `native-with-thread-names` - Instruction addresses from unwinding the stack. Includes the thread
name as the first frame.
+7
View File
@@ -16,6 +16,13 @@ This document uses the following convention to categorize breaking changes:
## Breaking API Changes (45.0)
### Removed: `contentTracing.enableHeapProfiling()`
The experimental `contentTracing.enableHeapProfiling()` API has been removed.
Chromium removed the memlog implementation that backed this API and replaced it
with a Perfetto heap-profiling data source. Heap profiling through Electron's
`contentTracing` API is unavailable until that data source is integrated.
### Behavior Changed: screen capture requests are reported as `display-capture` in `setPermissionRequestHandler`
Requests to capture the screen, a window or a tab -- made through
-1
View File
@@ -96,7 +96,6 @@ auto_filenames = {
"docs/api/structures/custom-scheme.md",
"docs/api/structures/desktop-capturer-source.md",
"docs/api/structures/display.md",
"docs/api/structures/enable-heap-profiling-options.md",
"docs/api/structures/extension-info.md",
"docs/api/structures/extension.md",
"docs/api/structures/file-filter.md",
-1
View File
@@ -159,7 +159,6 @@ chore_let_the_embedder_handle_shared_d-bus_disconnects.patch
remove_cr_xcode_build_define_from_build_gn.patch
chore_add_to_ubsan_ignorelists.patch
fix_wayland_window_stuck_maximized_after_early_maximize.patch
fix_register_the_spare_renderer_before_initializing_it.patch
revert_remove_the_feature_flag_kdropinputeventswhilepaintholding.patch
fix_disable_enable_resource_allowlist_generation_on_windows.patch
fix_fall_back_to_an_unlocalized_touch_id_prompt_reason_when_the.patch
@@ -23,10 +23,10 @@ index 777084a902881df5b5107ecb596e2225aad36281..f6771b8b6c1db5f00cde78877a3c2bdf
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index cb52bdc38249f88019a2894e1cf776aaec13e295..b54f981376e4624c88124b7a44968952f32e36c5 100644
index 9c0e1ca47f9b172a1ff70769414a6f629f4f235c..9b51b6da113fd397af5e6e21ae5fc020d57916b2 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4982,6 +4982,13 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4981,6 +4981,13 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
}
}
@@ -51,7 +51,7 @@ index d98b5dda96208e3f923aa8a9c6e6eb988004904b..7c91ed2d7a397ad9e36cbecfc13de7bd
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 6f41be18825d5ccf38e43673dfef687d402224d1..4a98ad648ab5399974ac15978064bc01f962ae9d 100644
index 7c2de5c89b45d24fe8b33a1c9d3a96afb7949e09..39cbf896c84550a0f5a9c8c7b08a7c6c7e13ea2c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -686,8 +686,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -116,7 +116,7 @@ index 0d1d81ec7d6b27891a5135961f4c630df82819df..325d2691357372b31df78781b6e453e2
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 675026b5bb72bcbbda8da1b26bb8cde3821b1592..d019d4fe54ce81b6844f522575eb3d097f4d7c6a 100644
index b24669cc62b9c4b1a9d9ee84609832ae52ceffed..64e0aeaf03ba9a6e6f0342b93bb716dd550eb985 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2569,6 +2569,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -130,7 +130,7 @@ index 675026b5bb72bcbbda8da1b26bb8cde3821b1592..d019d4fe54ce81b6844f522575eb3d09
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
!old_state->is_in_back_forward_cache;
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
@@ -4259,10 +4263,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -4265,10 +4269,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
+3 -3
View File
@@ -49,10 +49,10 @@ index d69be19a1e4b2db98cfcecc6491da122117a7bc0..e18f84fcf109939f95239591af3242d4
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 605a2ff8ad46a3f65aadb77ea394fd8261fb9435..874bc78f43dc71143771978a9a572bff8f109f28 100644
index e491bf8a43f9b07be9acc0f0c70cf1198fcc1afd..4327589166972f6074c527eb5891bce7cff7fb62 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -778,10 +778,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -792,10 +792,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index 605a2ff8ad46a3f65aadb77ea394fd8261fb9435..874bc78f43dc71143771978a9a572bff
if (!Client()) {
return false;
}
@@ -859,6 +855,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -873,6 +869,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();
@@ -171,20 +171,20 @@ index ac7a5b84e93fd0bdf9eed224b2dd391621259636..78c1d0fcfd80b137d770a0064c4ffdf2
}
diff --git a/tools/resources/ar.py b/tools/resources/ar.py
index 0288f2ca358045996d1997cd57cd31e68c47db62..12eebb8deee9d8dc842529cd7a8fa5ca4eec7b92 100755
index fe62384148b5ab93d0eb5275b04a974ee0a08af2..492af3458b9a63210f4b3427d7752529100def52 100755
--- a/tools/resources/ar.py
+++ b/tools/resources/ar.py
@@ -93,7 +93,12 @@ def ExpandThinArchives(paths):
if header == b'!<thin>\n':
for subpath in _IterThinPaths(path):
expanded_paths.append(_ResolveThinObjectPath(path, subpath))
- elif path.endswith('.a') and header != b'!<arch>\n':
+ elif (header == b'!<arch>\n'
+ or header[:4] in (b'\xca\xfe\xba\xbe', b'\xca\xfe\xba\xbf')):
+ # Regular archives (and Mach-O universal archives on Apple platforms)
+ # embed their members' contents, so keep them to be scanned directly.
+ expanded_paths.append(path)
+ elif path.endswith('.a'):
raise ValueError(f'Invalid archive header in {path}: {header!r}')
@@ -90,7 +90,12 @@ def ExpandThinArchives(paths):
if is_thin:
for subpath in _IterThinPaths(path):
expanded_paths.append(_ResolveThinObjectPath(path, subpath))
- elif header != b'!<arch>\n':
+ elif (header == b'!<arch>\n'
+ or header[:4] in (b'\xca\xfe\xba\xbe', b'\xca\xfe\xba\xbf')):
+ # Regular archives (and Mach-O universal archives on Apple platforms)
+ # embed their members' contents, so keep them to be scanned directly.
+ expanded_paths.append(path)
+ else:
raise Exception('Invalid .a: ' + path)
return expanded_paths
@@ -32,7 +32,7 @@ index a9ab1614b67e2df7b379c1d8a4147265a15747db..f1c60c7d0a320e5a1e9a9e454ef0e084
#define _LIBCPP_ABI_FORCE_ITANIUM 0
#define _LIBCPP_ABI_FORCE_MICROSOFT 0
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 9b70b2fd58b5076d2dbedf65dd0f662c60282a2d..fbbe3f275ae155c567d2fe7fc564148482a30acb 100644
index e6745238089425cba1533d315d437f07e18056e0..1fa26525e03377de72ba48cf1e9209147a977682 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -41,6 +41,7 @@
+8 -8
View File
@@ -12,10 +12,10 @@ that the new window is created in its own BrowsingInstance (and process).
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index ceacd68a0a267e8b813d29e6b0da20d4870905be..5e3fd5f266523636a8ecd61ac81e4112eb34ef15 100644
index f0e68222e580ebe24c1138d6a10480a540c75dbd..9fed9c7021a5b6a38521301fc830f17373a2c8e2 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -10632,6 +10632,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -10631,6 +10631,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -23,7 +23,7 @@ index ceacd68a0a267e8b813d29e6b0da20d4870905be..5e3fd5f266523636a8ecd61ac81e4112
effective_transient_activation_state, params->opener_suppressed,
&no_javascript_access);
@@ -10642,6 +10643,11 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -10641,6 +10642,11 @@ void RenderFrameHostImpl::CreateNewWindow(
return;
}
@@ -36,7 +36,7 @@ index ceacd68a0a267e8b813d29e6b0da20d4870905be..5e3fd5f266523636a8ecd61ac81e4112
// important to do this before we return from the |opener_suppressed| case
// below.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0d07dd8bf2dd38614b8f54aa0377211308625ca4..983513eea85af542a8f7074a2c8280aebddf670d 100644
index 075a3a3e56adf5a0d0f6de49059548fd813986dd..86eb92be61496dfe59ed2daa5545bf6246f63457 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5706,6 +5706,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -188,10 +188,10 @@ index c3d8d88a3e436515e6f44e0725123ecd56bb76f1..7ad0f8004e2f454b71d866d533f69ae8
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index fedf27a0b00ced794768b34420a5fac4562ef49f..cb52bdc38249f88019a2894e1cf776aaec13e295 100644
index b0b902a690101434c8121d2310ea7173e870d8c0..9c0e1ca47f9b172a1ff70769414a6f629f4f235c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -7150,6 +7150,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -7142,6 +7142,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
params->started_by_ad =
GetWebFrame()->IsAdFrame() || GetWebFrame()->IsAdScriptInStack();
@@ -242,10 +242,10 @@ index 1208199428a2de729650c82e988ab67abeb0e786..2e6643ede047a580a636dbf75e86c99f
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index 96269e2a1b2f77ab901d6137fbb54c8ae9089a25..2986d3ba759ae6312f82159ef1b1810af292ba90 100644
index 2721447eb5246eba8ef3e85e6682ec587c3d012e..2c25046a3a9b8b8a6d88d1daff978410f2e26e5c 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2492,6 +2492,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2499,6 +2499,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);
@@ -34,10 +34,10 @@ index f6771b8b6c1db5f00cde78877a3c2bdf5a38d61a..800eb200f8a9e4b7b44a4d22c0cf169c
virtual void DidClearWindowObject() {}
virtual void DidChangeScrollOffset() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index b54f981376e4624c88124b7a44968952f32e36c5..540aa229335c567fc4fe2c2776899199c8a0e761 100644
index 9b51b6da113fd397af5e6e21ae5fc020d57916b2..386da76d229837b8caa4304d028fd7aa4aa0a536 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4989,10 +4989,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
@@ -4988,10 +4988,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
}
}
@@ -14,7 +14,7 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8dd73d0447776743aff4f0e26fa5310636de7bd3..3bdc5b53366933c5946e7afac4a5400357dd60e8 100644
index a917b6f577c43969711aad5c679de3fd49296981..5d691f111128e81fd0830315d30598d6e020d89e 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5677,7 +5677,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -14,15 +14,15 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 89f12a409c929c3dac9c4196875679537dfae6d8..967a71d2960d10b333ad4a9ed521e2bdef9e50f2 100644
index 014ad1e920e648fbfff43ab0c82f655c2be28042..32d0a2d5ec35d8b4cc294c493dd2d543deb38318 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -224,7 +224,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
@@ -228,7 +228,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
BrowserContext* browser_context,
const StoragePartitionConfig& partition_config) {
DCHECK(browser_context);
- DCHECK(!partition_config.is_default());
+ // DCHECK(!partition_config.is_default());
CHECK(browser_context, base::NotFatalUntil::M158);
- CHECK(!partition_config.is_default(), base::NotFatalUntil::M158);
+ // CHECK(!partition_config.is_default(), base::NotFatalUntil::M158);
auto guest_site_info =
SiteInfo::CreateForGuest(browser_context, partition_config);
@@ -80,10 +80,10 @@ index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23
content::WebContents* source,
const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser_web_contents_delegate/browser_web_contents_delegate.cc b/chrome/browser/ui/browser_web_contents_delegate/browser_web_contents_delegate.cc
index 8c14dc878b81b80d97bf42d1a3615b56c7785cb0..8b3c1187c7ac5a0d1b1124efef4ecab8eec21d2a 100644
index 486a9a389e247ce46add4e19a3d55e99b6d8c3c9..ccb1eacb6a6443b695a95f4d6ee21a9643f7ec55 100644
--- a/chrome/browser/ui/browser_web_contents_delegate/browser_web_contents_delegate.cc
+++ b/chrome/browser/ui/browser_web_contents_delegate/browser_web_contents_delegate.cc
@@ -991,8 +991,7 @@ bool BrowserWebContentsDelegate::IsWebContentsCreationOverridden(
@@ -992,8 +992,7 @@ bool BrowserWebContentsDelegate::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -93,7 +93,7 @@ index 8c14dc878b81b80d97bf42d1a3615b56c7785cb0..8b3c1187c7ac5a0d1b1124efef4ecab8
if (actor::HasActorTaskPreventingNewWebContents(opener)) {
// If an ExecutionEngine is acting on the opener, prevent it from creating a
// new WebContents. We'll instead force the navigation to happen in the same
@@ -1015,7 +1014,7 @@ bool BrowserWebContentsDelegate::IsWebContentsCreationOverridden(
@@ -1016,7 +1015,7 @@ bool BrowserWebContentsDelegate::IsWebContentsCreationOverridden(
content::mojom::WindowContainerType::BACKGROUND &&
ShouldCreateBackgroundContents(browser_->GetProfile(),
source_site_instance, opener_url,
@@ -145,10 +145,10 @@ index 5e440426ed56c423d77a60e18ee592f506f2ae88..4c6804eb7c56fdfda7afc2804f300870
// The profile used for the presentation.
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
index 52e96d65dfc367a55815a26bd7f15beb23a8b613..b27c9a411cb76056c03635185a500723b184a17d 100644
index fcff4d9474d180d54d7332fd619ada26dc81ef2b..421354ec0821ef806dae5fb2ee00e8a4bed91ded 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -106,8 +106,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -107,8 +107,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -251,7 +251,7 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
content::WebContents* AddNewContents(
content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ef5291544a95a491ff26b4ba4383d58ba799e0c4..3f6adff654507ff6fbc20e5f238268d57ad7f0a3 100644
index 6e8249f1c1bcb1f00e5e868bb9a5a39092a2e6c8..c6725f912feceb92a43441b16d7637ef000f2649 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5641,8 +5641,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+2 -2
View File
@@ -54,7 +54,7 @@ index de56c9b94f92e9abf69b1d4894e5d386cad6d3cd..f8955ef7cc43b1854b29841ed65260a1
const Source& GetSource(int index) const override;
DesktopMediaList::Type GetMediaListType() const override;
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index 3017f61205d6261e98671087c34f43daa37830ea..b02d1b8c3fd672083d11361aba9c5b0b53f8a05f 100644
index c30b6744661459a28f4140ff03fa6d175a511d5c..f8c106acb96965f60044b4b2e89a3691da08c124 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -216,10 +216,14 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
@@ -72,7 +72,7 @@ index 3017f61205d6261e98671087c34f43daa37830ea..b02d1b8c3fd672083d11361aba9c5b0b
#endif
return window_id;
@@ -1025,6 +1029,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
@@ -1037,6 +1041,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
base::Unretained(worker_.get()),
std::move(native_ids), thumbnail_size_));
@@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 96e2f9442b2fbfe37d56d119cc696b63aedceb46..19d30c501e8b0b619e28ed86e200b0489d183f71 100644
index 2ddaabf880ca0c248dfb2a73f16e4d170f0267eb..f4b6b10868ffa39086683b98bcf84488d5e3fed8 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -673,7 +673,11 @@ void SendVisibleTimeRequestToDelegatedFrameHost(
+1 -1
View File
@@ -34,7 +34,7 @@ index 0016174ffc095bf077e1ad3455bea5e28973eb63..b5879712fb76e792124491fb511ef5aa
// |routing_id| must not be IPC::mojom::kRoutingIdNone.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 7e155968e43e2493115d9a3935b243a2fe4e6c1c..6f41be18825d5ccf38e43673dfef687d402224d1 100644
index 98013c7c0835ee6f163d4c233abacdb223da02c3..7c2de5c89b45d24fe8b33a1c9d3a96afb7949e09 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -745,7 +745,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 5f39008fba5d457cfcb9690ae381c61b00607b3a..293a16f72777965eb5718e0229d1caa3d882866c 100644
index 5913c18fcfb3f470746d3e82c56cc5345ab8227c..8a4ec18e17a506cf9650a2e504f83925bbf65628 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -2080,6 +2080,13 @@ void NetworkContext::SetNetworkConditions(
@@ -2081,6 +2081,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -15,7 +15,7 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index d019d4fe54ce81b6844f522575eb3d097f4d7c6a..9c5b3d4b26784484a3c55858da0fc96fbfd71230 100644
index 64e0aeaf03ba9a6e6f0342b93bb716dd550eb985..a3f1ee330bcb6c1424d05f884b57b522e7196a21 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -1920,6 +1920,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -26,10 +26,10 @@ hook called before the new RenderFrame is created so it can be picked up
by RenderFrameCreated() on the same call stack.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 8b784147d4320c45d03f111907886b6e2deafd1b..a890bdbdf46c6583f044a15cda527af961d2a46a 100644
index b5b6eec8c2deaf047f88b0ab9afd2533ed5aa8d1..fe7b28b780c41bda90b6803581b3cd50da9ef0da 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -10835,7 +10835,12 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -10834,7 +10834,12 @@ void RenderFrameHostImpl::CreateNewWindow(
new_main_rfh->GetSiteInstance()->browsing_instance_token(),
delegate_->GetColorProviderColorMaps(),
/*widget_screen_rect=*/std::nullopt,
@@ -148,10 +148,10 @@ index 51d460f9982489575e94ad3726a44f77800a44ba..84fb8167a48f033fd941cfcb6feabbc3
// `outermost_origin` is only set if it is an extension scheme, otherwise
// it will be null. It is null to avoid leaking unnecessary information into
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 540aa229335c567fc4fe2c2776899199c8a0e761..503b81896ed65fa312071a49d1c26ed1e8cdc8f5 100644
index 386da76d229837b8caa4304d028fd7aa4aa0a536..875f99016a442ae323d2f5dea09003de726c465e 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -7207,6 +7207,14 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -7199,6 +7199,14 @@ WebView* RenderFrameImpl::CreateNewWindow(
return nullptr;
}
@@ -46,7 +46,7 @@ index 1c01e4d6699da8760e074a5825784e139ed58fd4..c678a3df0b9e5a8c9e0bd99c1aa540b2
'internal-forced-visited-'):
internal_visited_order = 0
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index 358aa3e48092530dc70d054c738ba36d154de316..bdcaad3bae3123f9318d7b9c2ca7f837bba19be8 100644
index 843f4a904ba6d29c9b6408bf426bbef5693aa01c..95da2e230ef15bbb704d7e8298279b83195b85d9 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -10299,6 +10299,27 @@
@@ -91,10 +91,10 @@ index d9983abcd27cb91c62c1a45689813bd01328b245..8bd8885d7d9c59d4059a3c33b6d3d6df
return a.EmptyCells() == b.EmptyCells();
case CSSPropertyID::kFill:
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
index 6c141550b40e2879a8c01ef590ddefcfea0a28fd..80e1937d46ce1011d25f97dbd8088ef2327a9652 100644
index 72f103053983f59fff9ba0d8580a3401a972bff2..7ffed261bf14f4d3105b42496373eaee43386135 100644
--- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
+++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -12787,5 +12787,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
@@ -12776,5 +12776,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
CSSValueID::kNone>(stream);
}
@@ -314,7 +314,7 @@ index 398fc8badaaf1dddc3183211c9302460393da85f..b35c8261b27a2d5c5f6bd84b606925c9
auto DrawAsSinglePath = [&]() {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index ec3bed45d1a5768cda6f52ddb30025d024e8dade..d16a128464b6b22599c930930be4240b58296bec 100644
index 79111caa1a3d26c34f35f7feb842fe6ec219069f..a9b5c4b041f8e5c30f09605ebf5f720452c57d28 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -215,6 +215,10 @@
@@ -169,7 +169,7 @@ index a3bfdd9c15d3cfc5053c2a36767ea7964f2740fd..d9d608ea5b01cff08654b11e455fd7af
WebFetchClientSettingsObject outside_fetch_client_settings_object)
: wait_for_debugger_mode(kDontWaitForDebugger),
diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_params.h b/third_party/blink/renderer/core/workers/global_scope_creation_params.h
index 51515477321e5e010c264a2bd523e2d2c3c9f3bf..3a3631e135cb74747b49b20e22ad9537baadede3 100644
index 397909953a19cf840f657d4ee8489b0d0e62059f..59c7806e1937fd681bc206ff3bbd7a8f17fe78c0 100644
--- a/third_party/blink/renderer/core/workers/global_scope_creation_params.h
+++ b/third_party/blink/renderer/core/workers/global_scope_creation_params.h
@@ -11,6 +11,7 @@
@@ -180,7 +180,7 @@ index 51515477321e5e010c264a2bd523e2d2c3c9f3bf..3a3631e135cb74747b49b20e22ad9537
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/storage_access_api/status.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
@@ -263,6 +264,11 @@ struct CORE_EXPORT GlobalScopeCreationParams final {
@@ -268,6 +269,11 @@ struct CORE_EXPORT GlobalScopeCreationParams final {
// i.e. when DedicatedWorkerStart() was called.
std::optional<base::TimeTicks> dedicated_worker_start_time;
@@ -10,7 +10,7 @@ relying on a process-wide command line switch. The value is also
propagated to nested workers via WorkerSettings::Copy.
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third_party/blink/renderer/core/workers/dedicated_worker.cc
index bc8726d68af801c093bc4baf266c7d3271638df8..519530ba218afa6be4654e1ff7d0d623b9a4429e 100644
index 44536a1cac397bc9fb18670096c7efdbfe3f3ce4..6d305498f966bfbf250b90f57163a8eb93245320 100644
--- a/third_party/blink/renderer/core/workers/dedicated_worker.cc
+++ b/third_party/blink/renderer/core/workers/dedicated_worker.cc
@@ -37,6 +37,7 @@
@@ -67,10 +67,10 @@ index 4025a23ea2bcb7ee7ba9eabd6a1d23fae80b145b..80f1ff1833e481e81e8e4e1576c486ea
return _headless_info.get();
}
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index e042422e337f7b4fb64110d5b1519629c0becd7a..3fe773985862626070d51eb282211dfddc9de2fb 100644
index f7ec5823e1c8e8fbb2672cf5464d35c42200a843..42b51daf6b7bb167474b38c42c95b1a31be4c2be 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -589,7 +589,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -603,7 +603,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
is_translucent_window_ = params->is_translucent;
pending_restoration_data_ = params->state_restoration_data.Clone();
@@ -139,10 +139,10 @@ index ec371b4676ba3f91a3c8198db00facb9c926b869..719cae31fb885d12ffdd4c3a6ecf91dd
// Register the CGWindowID (used to identify this window for video capture)
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index c8c6adbd56070f01d09a7e12f5481ee2703718c6..17955f684f8aeb17d2a2a2a75763e3e33a78dfbb 100644
index 95f532e14b779b71e8b596459b3d28833d74aec3..dc8063ba415b3cd40fbb325eca0bf6da331a52ef 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -268,6 +268,18 @@ ui::ZOrderLevel Widget::InitParams::EffectiveZOrderLevel() const {
@@ -263,6 +263,18 @@ ui::ZOrderLevel Widget::InitParams::EffectiveZOrderLevel() const {
}
}
@@ -161,7 +161,7 @@ index c8c6adbd56070f01d09a7e12f5481ee2703718c6..17955f684f8aeb17d2a2a2a75763e3e3
void Widget::InitParams::SetParent(Widget* parent_widget) {
SetParent(parent_widget->GetNativeView());
}
@@ -535,6 +547,7 @@ void Widget::Init(InitParams params) {
@@ -530,6 +542,7 @@ void Widget::Init(InitParams params) {
params.child |= (params.type == InitParams::TYPE_CONTROL);
is_top_level_ = !params.child;
@@ -13,10 +13,10 @@ Opt the observers_ list into kAllowReentrancy via ReentrantObserverList,
matching the pattern upstream adopted for SequenceManager::task_observers.
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index e91f29591013fe24eb2a6c8dc4c30e7612234d18..8a0d087dbc5ae66178ef05e3b4bbdbe62fd013ff 100644
index c95aa50e7320a6c04c7d6e3cdfe0c8c8365526f8..b89b9d8ee3ec1831100f126a96f4881c2e9232f3 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -371,7 +371,7 @@ class CONTENT_EXPORT DownloadManagerImpl
@@ -374,7 +374,7 @@ class CONTENT_EXPORT DownloadManagerImpl
bool in_progress_cache_initialized_;
// Observers that want to be notified of changes to the set of downloads.
@@ -8,7 +8,7 @@ Check for broken links by confirming the file exists before setting its utime.
This patch should be upstreamed & removed.
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 7ebef78f125c58d117c0b0a79513ebdd17011208..6eb8dba7e9ae9fdce5e37b003dce5510cd3eb006 100755
index 32b75b0f017b95ed00b6a2c78495ca28600fc886..c0a9a1b4a6cf1521e6d94887d07709fac6e21290 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -217,10 +217,9 @@ def DownloadAndUnpack(url, output_dir, path_prefixes=None, is_known_zip=False):
@@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned
by the `ui::Compositor`.
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 0560284766ebfb71b20aa4131db89b62e3e5f730..6d7e77f3904e12f35f6aa01c932ca2634d84c5e7 100644
index 791dd08a8d911e3c8a226804e9645c4ef1554ca0..201f914eaa68ba96f01fd39a2f72bf3442cb7a8d 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -369,7 +369,8 @@ void Compositor::SetLayerTreeFrameSink(
@@ -368,7 +368,8 @@ void Compositor::SetLayerTreeFrameSink(
// to match the Compositor's.
if (display_private_) {
display_private_->Resize(size());
@@ -25,7 +25,7 @@ index 0560284766ebfb71b20aa4131db89b62e3e5f730..6d7e77f3904e12f35f6aa01c932ca263
display_private_->SetDisplayColorSpaces(display_color_spaces_);
display_private_->SetDisplayColorMatrix(
gfx::SkM44ToTransform(display_color_matrix_));
@@ -609,7 +610,9 @@ void Compositor::SetVisible(bool visible) {
@@ -608,7 +609,9 @@ void Compositor::SetVisible(bool visible) {
// updated then. We need to call this even if the visibility hasn't changed,
// for the same reason.
if (display_private_)
@@ -36,7 +36,7 @@ index 0560284766ebfb71b20aa4131db89b62e3e5f730..6d7e77f3904e12f35f6aa01c932ca263
if (changed) {
observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged,
@@ -1077,6 +1080,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
@@ -1076,6 +1079,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
host_begin_frame_observer_->GetBoundRemote());
}
@@ -13,10 +13,10 @@ This patch fixes the crash by ensuring COM is initialized on the
capture thread by calling `init_com_with_mta(false)`.
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index b02d1b8c3fd672083d11361aba9c5b0b53f8a05f..ffdd1569bbba570bab9915190e9da325493f9cc6 100644
index f8c106acb96965f60044b4b2e89a3691da08c124..8949f855e6509a230c8bb995a39d2c54416dcd1d 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -790,6 +790,13 @@ NativeDesktopMediaList::NativeDesktopMediaList(
@@ -802,6 +802,13 @@ NativeDesktopMediaList::NativeDesktopMediaList(
base::MessagePumpType thread_type = base::MessagePumpType::UI;
#else
base::MessagePumpType thread_type = base::MessagePumpType::DEFAULT;
+6 -6
View File
@@ -13,10 +13,10 @@ https://github.com/electron/electron/pull/48675#issuecomment-3452781711
for more info.
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
index 60a3c13471a630c36b377544e83bd5bf967c47d7..8169dfff20f281ebe9b489fb0449fbd09af7d0b8 100644
index 98f9abe44e4c0c85e69fda3f1c28bc48b5345dce..b6386ecc2eca721cc56a47a16f77c3a5c5eb506a 100644
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
@@ -137,8 +137,9 @@ int NextServiceId() {
@@ -138,8 +138,9 @@ int NextServiceId() {
return ++status_icon_count;
}
@@ -28,7 +28,7 @@ index 60a3c13471a630c36b377544e83bd5bf967c47d7..8169dfff20f281ebe9b489fb0449fbd0
}
using DbusImage = std::tuple</*width=*/int32_t,
@@ -249,15 +250,17 @@ scoped_refptr<dbus::Bus> GetBusForNewStatusIcon() {
@@ -250,15 +251,17 @@ scoped_refptr<dbus::Bus> GetBusForNewStatusIcon() {
} // namespace
@@ -50,7 +50,7 @@ index 60a3c13471a630c36b377544e83bd5bf967c47d7..8169dfff20f281ebe9b489fb0449fbd0
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (bus_) {
CheckStatusNotifierWatcherHasOwner();
@@ -469,7 +472,8 @@ void StatusIconLinuxDbus::OnHostRegisteredResponse(
@@ -476,7 +479,8 @@ void StatusIconLinuxDbus::OnHostRegisteredResponse(
SetProperty<"s">(kPropertyAttentionIconName, "", false);
SetProperty<"s">(kPropertyAttentionMovieName, "", false);
SetProperty<"s">(kPropertyCategory, kPropertyValueCategory, false);
@@ -61,7 +61,7 @@ index 60a3c13471a630c36b377544e83bd5bf967c47d7..8169dfff20f281ebe9b489fb0449fbd0
SetProperty<"s">(kPropertyStatus, kPropertyValueStatus, false);
SetProperty<"s">(kPropertyTitle, "", false);
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
index 5f7e20bc0b56b5621cfb04d96712b2f1db91cf0e..9668ee5a48e180d0ace989c6cb6d9364a162c5ce 100644
index e45db2d3a657dfacf8042d49113f5a3f2e960ee7..aa5647cdf8b9431b7195c8e6c70ee32dab6e28b2 100644
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
@@ -38,8 +38,9 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
@@ -76,7 +76,7 @@ index 5f7e20bc0b56b5621cfb04d96712b2f1db91cf0e..9668ee5a48e180d0ace989c6cb6d9364
StatusIconLinuxDbus(const StatusIconLinuxDbus&) = delete;
StatusIconLinuxDbus& operator=(const StatusIconLinuxDbus&) = delete;
@@ -161,6 +162,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
@@ -163,6 +164,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
size_t icon_file_id_ = 0;
base::FilePath icon_file_;
@@ -9,10 +9,10 @@ focus node change via TextInputManager.
chromium-bug: https://crbug.com/1369605
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 4a98ad648ab5399974ac15978064bc01f962ae9d..ea9acde2e35d488d16cf562ebd62c1500ae65168 100644
index 39cbf896c84550a0f5a9c8c7b08a7c6c7e13ea2c..404551e1287cfcaca1114770b9604bb77ef4c447 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -3625,6 +3625,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
@@ -3631,6 +3631,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
}
}
@@ -26,10 +26,10 @@ index 4a98ad648ab5399974ac15978064bc01f962ae9d..ea9acde2e35d488d16cf562ebd62c150
RenderWidgetHostViewAura* popup_child_host_view) {
popup_child_host_view_ = popup_child_host_view;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 1f743053f8ca891d820f4dd1c4d93d84c2c4769c..aaabb5f1308a19d35fad27aa3be10cffc8432420 100644
index 21422e7e2d44aa4766d081da2e42e7ba5ebd82f4..aa91bc70d403d4a687f334d71b8d00d4cd88464c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -684,6 +684,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
@@ -685,6 +685,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
RenderWidgetHostViewBase* updated_view) override;
void OnTextSelectionChanged(TextInputManager* text_input_mangager,
RenderWidgetHostViewBase* updated_view) override;
@@ -87,10 +87,10 @@ index 6e07e5ef9d033aa6ac98e3f48966b560b0da115e..ee72a9bf160c10011a2d80f4023d1434
// The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 241e5ca73a1973ffd962d07f2d27b4771cbf2485..8dd73d0447776743aff4f0e26fa5310636de7bd3 100644
index bc5af6596ff8667b5ab4bdcda259cf89a3215ba7..a917b6f577c43969711aad5c679de3fd49296981 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -11072,7 +11072,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -11095,7 +11095,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
return;
}
RenderWidgetHostViewBase* root_view =
@@ -1,40 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Mon, 24 Aug 2026 07:19:20 +0000
Subject: fix: register the spare renderer before initializing it
SpareRenderProcessHostManagerImpl added a new spare to spare_rphs_ only
after RenderProcessHost::Init(), so RenderProcessHost::IsSpare() was
false while the process launched, including in
ContentBrowserClient::AppendExtraCommandLineSwitches(). Electron decides
a renderer's switches per WebContents there and needs to recognise the
spare, which has none. Push it onto the list first; nothing between the
two calls reads the list.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/8283216;
remove once it lands and rolls in.
diff --git a/content/browser/renderer_host/spare_render_process_host_manager_impl.cc b/content/browser/renderer_host/spare_render_process_host_manager_impl.cc
index bda3feda2c6496ae1e4d03b31dd174764a1214c3..6c5e743478a3898251080142225dd6354b92fd63 100644
--- a/content/browser/renderer_host/spare_render_process_host_manager_impl.cc
+++ b/content/browser/renderer_host/spare_render_process_host_manager_impl.cc
@@ -558,8 +558,8 @@ RenderProcessHost* SpareRenderProcessHostManagerImpl::WarmupSpare(
RenderProcessHostImpl::CreateSpareRenderProcessHost(
browser_context, nullptr /* site_instance */);
new_spare_rph->AddObserver(this);
- new_spare_rph->Init();
spare_rphs_.push_back(new_spare_rph);
+ new_spare_rph->Init();
// Use the new timeout if there is no previous renderer or
// the specified timeout will be triggered after the current timeout
@@ -1063,8 +1063,8 @@ void SpareRenderProcessHostManagerImpl::MaybeCreateExtraSpare() {
RenderProcessHostImpl::CreateSpareRenderProcessHost(
browser_context, nullptr /* site_instance */);
new_spare_rph->AddObserver(this);
- new_spare_rph->Init();
spare_rphs_.push_back(new_spare_rph);
+ new_spare_rph->Init();
}
void SpareRenderProcessHostManagerImpl::OnMetricsHeartbeatTimerFired() {
@@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 874bc78f43dc71143771978a9a572bff8f109f28..57e9b78d9e0be8c90fb76f9fdde2f90524076282 100644
index 4327589166972f6074c527eb5891bce7cff7fb62..f023001a64efa972804375ecbd7ce121873cbc17 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3379,6 +3379,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3393,6 +3393,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@@ -70,7 +70,7 @@ index 874bc78f43dc71143771978a9a572bff8f109f28..57e9b78d9e0be8c90fb76f9fdde2f905
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior,
@@ -3438,7 +3439,8 @@ void LocalFrame::RequestExecuteScript(
@@ -3452,7 +3453,8 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option,
+2 -2
View File
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index dab87ad0f62eeea5786335010f6c2f31e8606001..c0b016e7719cc18bf4c29bf1e4c8dc210a5cb24b 100644
index 37f163f0a4b8aebe6d36f07b123298e201c7e863..f9dbcdec16b3153117315bd8d92e7443b90ad6a1 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -5044,6 +5044,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -5045,6 +5045,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index b5503c48ce1c47bbc43e37e3872d8dedf9701003..ba7c98655370a6151a9530eba4c3ad3364364011 100644
index d55db4f82a97a1161d436c5c77ffbeac0f5ec708..a65bcf85eefc7e4b7db173a940d586664a4b72b1 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1804,6 +1804,11 @@
@@ -1800,6 +1800,11 @@
"includes": [12000],
},
@@ -50,7 +50,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 86038de345c8ef3489f9a4805e87bd7591a4d509..03c0f593b4221f95bf02e8075ad69089441619d8 100644
index 4606d8c6a1131c23945b0e9151c40c986ab071a5..9448daa8ada14d7509d99ff77e6070653acd1940 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1152,6 +1152,7 @@ component("base") {
@@ -129,10 +129,10 @@ index 416e541436d201aabca26cdbf7e8477103bd014c..8c5f92b03d67e5f0587b0e9420969061
}
diff --git a/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn b/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
index 9cc2a8a8e055fb90017c4f67a54bb8e20378d404..3b8c31d4b9b3e067b227458aa58541146e0768b5 100644
index 039fca1523a20720dc121b1e3bc6ec6918fa0c40..b65b941d012325ade33bfda765aa2bf2d96fab15 100644
--- a/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
+++ b/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
@@ -1040,6 +1040,7 @@ if (is_clang_or_gcc) {
@@ -1039,6 +1039,7 @@ if (is_clang_or_gcc) {
":allocator_base",
":allocator_core",
":buildflags",
@@ -831,7 +831,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa
- (NSWindow*)rootWindow {
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 77af8840a251f4005db95e5234e081be022b4eed..e042422e337f7b4fb64110d5b1519629c0becd7a 100644
index 09df8a41e1209922b95de1355acbe732f8a24d01..f7ec5823e1c8e8fbb2672cf5464d35c42200a843 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -42,6 +42,7 @@
@@ -842,7 +842,7 @@ index 77af8840a251f4005db95e5234e081be022b4eed..e042422e337f7b4fb64110d5b1519629
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "net/cert/x509_util_apple.h"
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
@@ -77,15 +78,19 @@
@@ -77,10 +78,13 @@
using CGRegionRef = CFTypeRef;
CG_EXTERN CGSConnectionID CGSMainConnectionID(void);
@@ -854,7 +854,9 @@ index 77af8840a251f4005db95e5234e081be022b4eed..e042422e337f7b4fb64110d5b1519629
CG_EXTERN CGRegionRef CGRegionCreateWithRect(CGRect rect);
+#endif
namespace {
namespace remote_cocoa {
@@ -93,6 +97,7 @@ CG_EXTERN CGError CGSSetWindowCaptureExcludeShape(CGSConnectionID cid,
constexpr auto kUIPaintTimeout = base::Milliseconds(500);
void ApplyCaptureExclusion(NSWindow* window, bool allow) {
@@ -862,7 +864,7 @@ index 77af8840a251f4005db95e5234e081be022b4eed..e042422e337f7b4fb64110d5b1519629
CGSConnectionID connection_id = CGSMainConnectionID();
CGSWindowID window_id = window.windowNumber;
CGRect frame = window.frame;
@@ -95,6 +100,9 @@ void ApplyCaptureExclusion(NSWindow* window, bool allow) {
@@ -102,6 +107,9 @@ void ApplyCaptureExclusion(NSWindow* window, bool allow) {
region.reset(CGRegionCreateWithRect(frame));
}
CGSSetWindowCaptureExcludeShape(connection_id, window_id, region.get());
@@ -872,7 +874,7 @@ index 77af8840a251f4005db95e5234e081be022b4eed..e042422e337f7b4fb64110d5b1519629
}
// Returns the display that the specified window is on.
@@ -802,10 +810,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -816,10 +824,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@@ -991,10 +993,10 @@ index 1f4f52db2cc37fd7383c432e09212e27df708732..ed4c62b6462684a79de8b69823f52ed7
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 76a97af0f62e4bce4987b3ea91b14265e69eaaa9..2c28176e2f428b92a085ff0b2e0e4d498bd85302 100644
index 4e9e52469939b99c085984cc7d2a041f395159a4..1b79ebbd7e13d93495f8d6f60aced166fad48c40 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -381,6 +381,7 @@ source_set("browser") {
@@ -380,6 +380,7 @@ source_set("browser") {
"//ui/webui/resources",
"//v8",
"//v8:v8_version",
@@ -1003,7 +1005,7 @@ index 76a97af0f62e4bce4987b3ea91b14265e69eaaa9..2c28176e2f428b92a085ff0b2e0e4d49
public_deps = [
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 2bab8a9ee3a89694d6adc0996d61eda13ddba7cd..0d1461a0b25878664ffd97effdf3d2ee04b3ab57 100644
index 2856a74454c33d5ff05303ade39ca1260f444bc6..65ef68b483b9a47c99ad1001c6bacf46895cf2b5 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -26,6 +26,7 @@
@@ -1024,7 +1026,7 @@ index 2bab8a9ee3a89694d6adc0996d61eda13ddba7cd..0d1461a0b25878664ffd97effdf3d2ee
@class RenderWidgetHostViewCocoa;
namespace content {
@@ -723,9 +726,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
@@ -724,9 +727,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
bool pointer_lock_unadjusted_movement_ = false;
@@ -1037,7 +1039,7 @@ index 2bab8a9ee3a89694d6adc0996d61eda13ddba7cd..0d1461a0b25878664ffd97effdf3d2ee
ui::AXTreeID parent_ax_tree_id_ = ui::AXTreeIDUnknown();
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index c069e4b687cf5d6b69f876f4adee3ed124cdcf24..96e2f9442b2fbfe37d56d119cc696b63aedceb46 100644
index 8aee3fc94c38f68c8a453238efc85a3b4ac64948..2ddaabf880ca0c248dfb2a73f16e4d170f0267eb 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -58,6 +58,7 @@
@@ -1059,7 +1061,7 @@ index c069e4b687cf5d6b69f876f4adee3ed124cdcf24..96e2f9442b2fbfe37d56d119cc696b63
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1873,10 +1876,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1879,10 +1882,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -1072,7 +1074,7 @@ index c069e4b687cf5d6b69f876f4adee3ed124cdcf24..96e2f9442b2fbfe37d56d119cc696b63
return gfx::NativeViewAccessible([GetInProcessNSView() window]);
}
@@ -1951,9 +1956,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1957,9 +1962,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -1084,7 +1086,7 @@ index c069e4b687cf5d6b69f876f4adee3ed124cdcf24..96e2f9442b2fbfe37d56d119cc696b63
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2504,20 +2511,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2510,20 +2517,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
GetRenderWidgetAccessibilityTokenCallback callback) {
base::ProcessId pid = getpid();
@@ -1124,10 +1126,10 @@ index 7af4d8bb3493245297407f662b130e8f581aa14b..2f424ceaae13b01dce075d227b3e68db
defines = []
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 9e7c9d9aa5cf5c170dbd6ad8cbe7d20ff2b249d9..97e2a8eecd59caa45c7902f292d08f32ae716499 100644
index 6a40348748b0209f91abfdba7dc78a734068a266..70cb637816ae41ebcde7814aa7887ef49d3ef7b0 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -323,6 +323,7 @@ target(link_target_type, "renderer") {
@@ -322,6 +322,7 @@ target(link_target_type, "renderer") {
"//ui/strings:auto_image_annotation_strings_grit",
"//url",
"//v8",
@@ -1206,10 +1208,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 63067b596bd6aafc68199207f8f3711f004c537e..817b295c0d06edf6046b15b49d47049ea32566c8 100644
index 8924e8cd09fbe9769ce502bc8f5f717e196329c4..75f764fcdf1f837137721df864f8b83b4711e853 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -651,6 +651,7 @@ static_library("test_support") {
@@ -650,6 +650,7 @@ static_library("test_support") {
"//url",
"//url/mojom:url_mojom_gurl",
"//v8",
@@ -1217,7 +1219,7 @@ index 63067b596bd6aafc68199207f8f3711f004c537e..817b295c0d06edf6046b15b49d47049e
]
data_deps = [
@@ -1133,6 +1134,8 @@ static_library("browsertest_support") {
@@ -1132,6 +1133,8 @@ static_library("browsertest_support") {
# TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
# enable the diagnostic by removing this line.
configs += [ "//build/config/compiler:no_exit_time_destructors" ]
@@ -1226,7 +1228,7 @@ index 63067b596bd6aafc68199207f8f3711f004c537e..817b295c0d06edf6046b15b49d47049e
}
mojom("content_test_mojo_bindings") {
@@ -2028,6 +2031,7 @@ test("content_browsertests") {
@@ -2027,6 +2030,7 @@ test("content_browsertests") {
"//ui/shell_dialogs",
"//ui/snapshot",
"//ui/webui:test_support",
@@ -2077,10 +2079,10 @@ index 866ae30a75731eb3adf37f56f562379781d4992b..cc8b9e561f262c5e793e9dc7bc381398
void DisplayCALayerTree::GotIOSurfaceFrame(
diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn
index 040207453f9f95974e8199c31f2d3cf31bb0e29f..64f9d55c10bad8b9f0c347ec42c6e64227bfa407 100644
index eadb44ecc00a1ac4f5c442eafe9ceb53279a36b1..107b98812188104f39ce90c27307d6aac2bd387d 100644
--- a/ui/accessibility/platform/BUILD.gn
+++ b/ui/accessibility/platform/BUILD.gn
@@ -302,6 +302,7 @@ component("platform") {
@@ -303,6 +303,7 @@ component("platform") {
"AppKit.framework",
"Foundation.framework",
]
@@ -2171,7 +2173,7 @@ index 9423a2891552e8df3ea5b05c720ab11795c4b92d..610c479ef03759d3082b42d7a402cbea
// Accessible object
if (AXElementWrapper::IsValidElement(value)) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index e3fdc65a703a5936aa164ce80144c3595521f6e8..e545ea0666b2ab44935e637151e3fed9d241cfdf 100644
index 0710184a81f54d1e01614cc539d25a33e6efb574..9ea44beada9721664f12b70e21b8c00cb2787e3e 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -356,6 +356,13 @@ component("base") {
@@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement
session.setCertificateVerifyCallback.
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 9137af1094f70e800f4bdfe42d6e8e0ac9e3e1f5..5f39008fba5d457cfcb9690ae381c61b00607b3a 100644
index 053a25db4b88e1a4e94a55c96d03babdbc011660..5913c18fcfb3f470746d3e82c56cc5345ab8227c 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -187,6 +187,11 @@
@@ -188,6 +188,11 @@
#include "services/network/ssl_private_key_proxy.h"
#endif
@@ -22,7 +22,7 @@ index 9137af1094f70e800f4bdfe42d6e8e0ac9e3e1f5..5f39008fba5d457cfcb9690ae381c61b
#if BUILDFLAG(IS_CT_SUPPORTED)
// gn check does not account for BUILDFLAG(). So, for iOS builds, it will
// complain about a missing dependency on the target exposing this header. Add a
@@ -670,6 +675,111 @@ void RemoveInvalidationFilterCallback(
@@ -671,6 +676,111 @@ void RemoveInvalidationFilterCallback(
} // namespace
@@ -134,7 +134,7 @@ index 9137af1094f70e800f4bdfe42d6e8e0ac9e3e1f5..5f39008fba5d457cfcb9690ae381c61b
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::NetworkContextHttpAuthPreferences::
@@ -1144,6 +1254,12 @@ void NetworkContext::CreateSocketFactory(
@@ -1145,6 +1255,12 @@ void NetworkContext::CreateSocketFactory(
socket_factory_receivers_.Add(socket_factory_.get(), std::move(receiver));
}
@@ -147,7 +147,7 @@ index 9137af1094f70e800f4bdfe42d6e8e0ac9e3e1f5..5f39008fba5d457cfcb9690ae381c61b
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2918,6 +3034,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2916,6 +3032,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::CoalescingCertVerifier>(
std::move(cert_verifier)));
@@ -133,10 +133,10 @@ index 9bf238e64af483294ae3c3f18a4e9aed49a8658d..b9b2a4c8c387b8e8b4eb1f02fc0f891c
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 92da3f57765515d5bdf23f661d3520ceaa3aeb5c..61fff829690113a495e9220bac890664b73ce3a2 100644
index 2eade17ba89d97ad0a07142ac68f5f75774ac0f3..559e80de80a714233e5f2e3daef95c5082f50dae 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2503,7 +2503,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2517,7 +2517,7 @@ void RenderProcessHostImpl::CreateNotificationService(
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -145,7 +145,7 @@ index 92da3f57765515d5bdf23f661d3520ceaa3aeb5c..61fff829690113a495e9220bac890664
creator_type, std::move(receiver));
break;
}
@@ -2511,7 +2511,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2525,7 +2525,7 @@ void RenderProcessHostImpl::CreateNotificationService(
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -8,10 +8,10 @@ is updated correctly, instead of overriding GetScreenInfo which seems not
working.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index e9279adb068790e1b1d1f5d0e15df22e1bfc9764..ce893f29cabacd26e797082ff15102f27f53db1d 100644
index fbaad741af816c489092915a2fd856dcc5eee91e..7188689167e56d7027a8c64b7e0d873bcc52b925 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -743,7 +743,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -745,7 +745,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// Generates the most current set of ScreenInfos from the current set of
// displays in the system for use in UpdateScreenInfo.
@@ -44,7 +44,7 @@ index cf8303ce26b968d247c5f0b41b87e24e389b93ae..94a3ee40f5594ce2aebe6aed5a1e4794
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 983513eea85af542a8f7074a2c8280aebddf670d..ef5291544a95a491ff26b4ba4383d58ba799e0c4 100644
index 86eb92be61496dfe59ed2daa5545bf6246f63457..6e8249f1c1bcb1f00e5e868bb9a5a39092a2e6c8 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -6584,6 +6584,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -60,7 +60,7 @@ index 983513eea85af542a8f7074a2c8280aebddf670d..ef5291544a95a491ff26b4ba4383d58b
RenderWidgetHostImpl* render_widget_host) {
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 6264cfdf93993165bebe93cc3fbc967baa785bd8..34367a786ab91dfcda6e8252d708e961d926b4fc 100644
index aef46a5c44abe5dc8e5c2167f578ca5d17f1630e..4b0847de0a745e4f9dff4b9b0a1a115c7e130c22 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1253,6 +1253,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -8,12 +8,12 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
to upstream this change to Chrome.
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
index 4b3de4a1bc12f1ade351f29f9301220ec6d5b3ad..6247bedb1e49d8b76978363ae8d6b82b08872ae4 100644
index c9a965ac0d4daeb6730286a1c1de49ea05e9ae06..911eb81ed0ad9a92316235306467848fbab7c360 100644
--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -90,11 +90,13 @@
#include "chrome/browser/ui/browser_window/public/browser_window_interface_iterator.h" // nogncheck crbug.com/40147906
@@ -91,11 +91,13 @@
#include "chrome/browser/ui/tabs/public/tab_features.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/file_system_access/file_system_access_page_action_controller.h"
+#if 0
#include "chrome/browser/web_applications/proto/web_app_install_state.pb.h" // nogncheck
@@ -25,7 +25,7 @@ index 4b3de4a1bc12f1ade351f29f9301220ec6d5b3ad..6247bedb1e49d8b76978363ae8d6b82b
#include "components/tabs/public/tab_interface.h"
#if BUILDFLAG(ENABLE_PLATFORM_APPS)
#include "extensions/browser/extension_registry.h" // nogncheck
@@ -334,216 +336,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
@@ -335,216 +337,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
}
#endif
@@ -246,7 +246,7 @@ index 4b3de4a1bc12f1ade351f29f9301220ec6d5b3ad..6247bedb1e49d8b76978363ae8d6b82b
// Checks if `path` should be blocked by the `rules`.
// The BlockType of the nearest ancestor of a path to check is what
@@ -1539,16 +1335,6 @@ struct ChromeFileSystemAccessPermissionContext::OriginState {
@@ -1540,16 +1336,6 @@ struct ChromeFileSystemAccessPermissionContext::OriginState {
std::unique_ptr<base::RetainingOneShotTimer> cleanup_timer;
};
@@ -263,7 +263,7 @@ index 4b3de4a1bc12f1ade351f29f9301220ec6d5b3ad..6247bedb1e49d8b76978363ae8d6b82b
ChromeFileSystemAccessPermissionContext::
ChromeFileSystemAccessPermissionContext(content::BrowserContext* context,
const base::Clock* clock)
@@ -1567,7 +1353,7 @@ ChromeFileSystemAccessPermissionContext::
@@ -1568,7 +1354,7 @@ ChromeFileSystemAccessPermissionContext::
#if BUILDFLAG(IS_ANDROID)
one_time_permissions_tracker_.Observe(
OneTimePermissionsTrackerFactory::GetForBrowserContext(context));
@@ -272,7 +272,7 @@ index 4b3de4a1bc12f1ade351f29f9301220ec6d5b3ad..6247bedb1e49d8b76978363ae8d6b82b
auto* provider = web_app::WebAppProvider::GetForWebApps(
Profile::FromBrowserContext(profile_));
if (provider) {
@@ -3047,7 +2833,7 @@ void ChromeFileSystemAccessPermissionContext::OnShutdown() {
@@ -3048,7 +2834,7 @@ void ChromeFileSystemAccessPermissionContext::OnShutdown() {
one_time_permissions_tracker_.Reset();
}
@@ -281,7 +281,7 @@ index 4b3de4a1bc12f1ade351f29f9301220ec6d5b3ad..6247bedb1e49d8b76978363ae8d6b82b
void ChromeFileSystemAccessPermissionContext::OnWebAppInstalled(
const webapps::AppId& app_id) {
if (!base::FeatureList::IsEnabled(
@@ -3405,11 +3191,7 @@ bool ChromeFileSystemAccessPermissionContext::
@@ -3406,11 +3192,7 @@ bool ChromeFileSystemAccessPermissionContext::
HandleType handle_type,
UserAction user_action,
GrantType grant_type) {
@@ -294,7 +294,7 @@ index 4b3de4a1bc12f1ade351f29f9301220ec6d5b3ad..6247bedb1e49d8b76978363ae8d6b82b
if (!base::FeatureList::IsEnabled(
features::kFileSystemAccessPersistentPermissions)) {
return false;
@@ -3460,6 +3242,7 @@ bool ChromeFileSystemAccessPermissionContext::
@@ -3461,6 +3243,7 @@ bool ChromeFileSystemAccessPermissionContext::
return false;
#endif // BUILDFLAG(IS_ANDROID)
@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
accessed from our JS event. The filtering is moved into Electron's code.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3bdc5b53366933c5946e7afac4a5400357dd60e8..d2bfb959e7a671372ecc3329624b1c1c63dfecec 100644
index 5d691f111128e81fd0830315d30598d6e020d89e..0bd73bee11af788b84696b083f81fb79117ba64e 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -11227,25 +11227,13 @@ void WebContentsImpl::RendererUnresponsive(
@@ -11250,25 +11250,13 @@ void WebContentsImpl::RendererUnresponsive(
base::RepeatingClosure hang_monitor_restarter) {
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
"render_widget_host", render_widget_host);
@@ -52,10 +52,10 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 27c64b4c4add8c04a4a39cd0eb9f292b41b596a6..b364de8562d684dcf3e45dc1f83f8133795bff3a 100644
index 6f97b7046d13cd81c16d511522886faf00ef6ccd..23ecd0ffbf52d4063f6f551674c1bee755fff007 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1753,7 +1753,7 @@ group("extra_resources") {
@@ -1732,7 +1732,7 @@ group("extra_resources") {
]
}
@@ -64,7 +64,7 @@ index 27c64b4c4add8c04a4a39cd0eb9f292b41b596a6..b364de8562d684dcf3e45dc1f83f8133
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1777,6 +1777,12 @@ repack("browser_tests_pak") {
@@ -1756,6 +1756,12 @@ repack("browser_tests_pak") {
deps = [ "//chrome/test/data/webui:resources" ]
}
@@ -54,7 +54,7 @@ index c1220bb3bc575ffa7c0e207cef7ee0cf3ed4d2b3..a2e58eb7de4561c9d2623ca1c13e7479
if (mouse_event_callback.Run(mouse_event)) {
return;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d2bfb959e7a671372ecc3329624b1c1c63dfecec..a6b68097aef44b0893eb026bbaba3abded37aa43 100644
index 0bd73bee11af788b84696b083f81fb79117ba64e..3a762499d8c1a67c7a22a26bc650a9786484dd47 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4716,6 +4716,12 @@ void WebContentsImpl::RenderWidgetWasResized(
@@ -71,7 +71,7 @@ index d2bfb959e7a671372ecc3329624b1c1c63dfecec..a6b68097aef44b0893eb026bbaba3abd
const gfx::PointF& client_pt) {
if (delegate_) {
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 34367a786ab91dfcda6e8252d708e961d926b4fc..ba132cdffe870503e54499941745e8941cb6bdab 100644
index 4b0847de0a745e4f9dff4b9b0a1a115c7e130c22..aa9e49736b6d5414cb68b010657a039a3127072d 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1166,6 +1166,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 61fff829690113a495e9220bac890664b73ce3a2..a5de7de7a4d7a2086eba4d1abc0206bb251287f2 100644
index 559e80de80a714233e5f2e3daef95c5082f50dae..a33771242a4b8bc9a625740c3a54e87ac6b1fe46 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2074,6 +2074,10 @@ bool RenderProcessHostImpl::Init() {
@@ -2088,6 +2088,10 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
*cmd_line, IsPdf(), IsJitDisabled());
+1 -1
View File
@@ -9,7 +9,7 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3f6adff654507ff6fbc20e5f238268d57ad7f0a3..d6e96d9b8ff3fc4a09da9a3c88caec7f8514b570 100644
index c6725f912feceb92a43441b16d7637ef000f2649..98b8b231a2566b60accdb87337d14348cea825a2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4440,6 +4440,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
+3 -3
View File
@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 5e3fd5f266523636a8ecd61ac81e4112eb34ef15..8b784147d4320c45d03f111907886b6e2deafd1b 100644
index 9fed9c7021a5b6a38521301fc830f17373a2c8e2..b5b6eec8c2deaf047f88b0ab9afd2533ed5aa8d1 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9597,6 +9597,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -9596,6 +9596,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@@ -37,7 +37,7 @@ index 5e3fd5f266523636a8ecd61ac81e4112eb34ef15..8b784147d4320c45d03f111907886b6e
if (had_fullscreen_token && !GetView()->HasFocus()) {
GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d6e96d9b8ff3fc4a09da9a3c88caec7f8514b570..241e5ca73a1973ffd962d07f2d27b4771cbf2485 100644
index 98b8b231a2566b60accdb87337d14348cea825a2..bc5af6596ff8667b5ab4bdcda259cf89a3215ba7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4733,21 +4733,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
-17
View File
@@ -12,14 +12,11 @@
#include "base/containers/extend.h"
#include "base/files/file_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/no_destructor.h"
#include "base/strings/string_split.h"
#include "components/services/heap_profiling/public/cpp/profiling_client.h"
#include "content/public/common/buildflags.h"
#include "electron/buildflags/buildflags.h"
#include "electron/fuses.h"
#include "extensions/common/constants.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "pdf/buildflags.h"
#include "shell/common/options_switches.h"
#include "shell/common/process_util.h"
@@ -231,18 +228,4 @@ bool ElectronContentClient::IsFilePickerAllowedForCrossOriginSubframe(
#endif
}
void ElectronContentClient::ExposeInterfacesToBrowser(
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::BinderMap* binders) {
// Sets up the client side of the multi-process heap profiler service.
binders->Add<heap_profiling::mojom::ProfilingClient>(
[](mojo::PendingReceiver<heap_profiling::mojom::ProfilingClient>
receiver) {
static base::NoDestructor<heap_profiling::ProfilingClient>
profiling_client;
profiling_client->BindToInterface(std::move(receiver));
},
io_task_runner);
}
} // namespace electron
-3
View File
@@ -40,9 +40,6 @@ class ElectronContentClient : public content::ContentClient {
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
bool IsFilePickerAllowedForCrossOriginSubframe(
const url::Origin& origin) override;
void ExposeInterfacesToBrowser(
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::BinderMap* binders) override;
};
} // namespace electron
@@ -14,11 +14,6 @@
#include "base/task/thread_pool.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_config.h"
#if !defined(ADDRESS_SANITIZER)
#include "components/heap_profiling/multi_process/client_connection_manager.h"
#include "components/heap_profiling/multi_process/supervisor.h"
#include "components/services/heap_profiling/public/cpp/settings.h"
#endif // !defined(ADDRESS_SANITIZER)
#include "content/public/browser/tracing_controller.h"
#include "shell/browser/browser.h"
#include "shell/browser/javascript_environment.h"
@@ -153,86 +148,6 @@ v8::Local<v8::Promise> GetCategories(v8::Isolate* isolate) {
return handle;
}
#if !defined(ADDRESS_SANITIZER)
std::tuple<heap_profiling::Mode, heap_profiling::mojom::StackMode, uint32_t>
GetHeapProfilingOptions(gin::Arguments* const args) {
heap_profiling::Mode mode = heap_profiling::Mode::kAll;
heap_profiling::mojom::StackMode stack_mode =
heap_profiling::mojom::StackMode::NATIVE_WITHOUT_THREAD_NAMES;
uint32_t sampling_rate = 100000;
gin_helper::Dictionary options;
if (args->GetNext(&options)) {
std::string mode_in;
std::string stack_mode_in;
std::optional<uint32_t> sampling_rate_in;
if (options.Get("mode", &mode_in)) {
heap_profiling::Mode converted =
heap_profiling::ConvertStringToMode(mode_in);
if (converted != heap_profiling::Mode::kNone &&
converted != heap_profiling::Mode::kManual) {
mode = converted;
}
}
if (options.Get("stackMode", &stack_mode_in)) {
stack_mode = heap_profiling::ConvertStringToStackMode(stack_mode_in);
}
if (options.GetOptional("samplingRate", &sampling_rate_in) &&
sampling_rate_in && sampling_rate_in.value() >= 1000 &&
sampling_rate_in.value() <= 10000000) {
sampling_rate = sampling_rate_in.value();
}
}
return {mode, stack_mode, sampling_rate};
}
bool g_heap_profiling_started = false;
#endif // !defined(ADDRESS_SANITIZER)
v8::Local<v8::Promise> EnableHeapProfiling(gin::Arguments* const args) {
#if defined(ADDRESS_SANITIZER)
// Memory sanitizers are using large memory shadow to keep track of memory
// state. Using memlog and memory sanitizers at the same time is slowing down
// user experience, causing the browser to be barely responsive. In theory,
// memlog and memory sanitizers are compatible and can run at the same time.
return gin_helper::Promise<void>::ResolvedPromise(args->isolate());
#else
gin_helper::Promise<void> promise(args->isolate());
v8::Local<v8::Promise> handle = promise.GetHandle();
auto* supervisor = heap_profiling::Supervisor::GetInstance();
if (supervisor->HasStarted() || g_heap_profiling_started) {
promise.RejectWithErrorMessage("Heap profiling is already enabled");
return handle;
}
// HasStarted() becomes true asynchronously. We keep track of whether we have
// called Start() already to avoid calling Start() twice.
g_heap_profiling_started = true;
auto [mode, stack_mode, sampling_rate] = GetHeapProfilingOptions(args);
supervisor->SetClientConnectionManagerConstructor(
[](base::WeakPtr<heap_profiling::Controller> controller_weak_ptr,
heap_profiling::Mode mode) {
return std::make_unique<heap_profiling::ClientConnectionManager>(
controller_weak_ptr, mode);
});
supervisor->Start(mode, stack_mode, sampling_rate,
base::BindOnce(gin_helper::Promise<void>::ResolvePromise,
std::move(promise)));
return handle;
#endif // defined(ADDRESS_SANITIZER)
}
v8::Local<v8::Promise> StartTracing(
v8::Isolate* isolate,
const base::trace_event::TraceConfig& trace_config) {
@@ -298,7 +213,6 @@ void Initialize(v8::Local<v8::Object> exports,
dict.SetMethod("startRecording", &StartTracing);
dict.SetMethod("stopRecording", &StopRecording);
dict.SetMethod("getTraceBufferUsage", &GetTraceBufferUsage);
dict.SetMethod("enableHeapProfiling", &EnableHeapProfiling);
}
} // namespace
@@ -275,8 +275,8 @@ class PromptResponder {
responder_->OnStreaming(response);
uint64_t token_count =
GetContextUsage(isolate, language_model_.Get(isolate));
responder_->OnCompletion(
blink::mojom::ModelExecutionContextInfo::New(token_count));
responder_->OnCompletion(blink::mojom::ModelExecutionContextInfo::New(
token_count, /*response_tokens=*/0));
completed_ = true;
DeleteThis();
} else if (IsReadableStream(isolate, val)) {
@@ -323,7 +323,8 @@ class PromptResponder {
uint64_t token_count = GetContextUsage(
isolate, weak_ptr->language_model_.Get(isolate));
weak_ptr->responder_->OnCompletion(
blink::mojom::ModelExecutionContextInfo::New(token_count));
blink::mojom::ModelExecutionContextInfo::New(
token_count, /*response_tokens=*/0));
weak_ptr->completed_ = true;
weak_ptr->DeleteThis();
} else {
@@ -577,8 +578,8 @@ void UtilityAILanguageModel::Append(
uint64_t token_count =
GetContextUsage(isolate, weak_ptr->language_model_.Get(isolate));
responder->OnCompletion(
blink::mojom::ModelExecutionContextInfo::New(token_count));
responder->OnCompletion(blink::mojom::ModelExecutionContextInfo::New(
token_count, /*response_tokens=*/0));
};
if (val->IsPromise()) {
+2 -254
View File
@@ -1,17 +1,13 @@
import { app, contentTracing, EnableHeapProfilingOptions, TraceConfig, TraceCategoriesAndOptions } from 'electron/main';
import { app, contentTracing, TraceConfig, TraceCategoriesAndOptions } from 'electron/main';
import { expect } from 'chai';
import { randomUUID } from 'node:crypto';
import { once } from 'node:events';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { setTimeout } from 'node:timers/promises';
import { ifdescribe, ifit, startRemoteControlApp } from './lib/spec-helpers';
const isCI = !!process.env.CI;
const fixturesPath = path.resolve(__dirname, 'fixtures');
import { ifdescribe } from './lib/spec-helpers';
// FIXME: The tests are skipped on linux arm64
ifdescribe(process.arch !== 'arm64' || process.platform !== 'linux')('contentTracing', () => {
@@ -178,254 +174,6 @@ ifdescribe(process.arch !== 'arm64' || process.platform !== 'linux')('contentTra
});
});
describe('enableHeapProfiling', function () {
const enableHeapProfilingTestTimeout = 120000;
this.timeout(enableHeapProfilingTestTimeout);
const checkForHeapDumps = async (options?: EnableHeapProfilingOptions | false) => {
const rc = await startRemoteControlApp([`--remote-app-timeout=${enableHeapProfilingTestTimeout}`]);
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } = await rc.remotely(
async (
htmlPath: string,
utilityProcessPath: string,
options: EnableHeapProfilingOptions | false | undefined,
isCI: boolean
) => {
const { contentTracing, BrowserWindow, utilityProcess } = require('electron');
const { once } = require('node:events');
const fs = require('node:fs');
const process = require('node:process');
const { setTimeout } = require('node:timers/promises');
const isEventWithNonEmptyHeapDumpForProcess = (event: any, pid: number) =>
event.cat === 'disabled-by-default-memory-infra' &&
event.name === 'periodic_interval' &&
event.pid === pid &&
event.args.dumps.level_of_detail === 'detailed' &&
event.args.dumps.process_mmaps?.vm_regions.length > 0 &&
typeof event.args.dumps.allocators === 'object' &&
typeof event.args.dumps.heaps_v2.allocators === 'object' &&
Object.values(event.args.dumps.allocators).some((allocator: any) => allocator.attrs.size?.value !== '0') &&
Object.values(event.args.dumps.heaps_v2.allocators).some(
(allocator: any) =>
allocator.counts.length > 0 && allocator.nodes.length > 0 && allocator.sizes.length > 0
);
const hasNonEmptyHeapDumpForProcess = (parsedTrace: any, pid: number) =>
parsedTrace.traceEvents.some((event: any) => isEventWithNonEmptyHeapDumpForProcess(event, pid));
if (options !== false) await contentTracing.enableHeapProfiling(options);
await contentTracing.startRecording({
included_categories: ['disabled-by-default-memory-infra'],
excluded_categories: ['*'],
memory_dump_config: {
triggers: [{ mode: 'detailed', periodic_interval_ms: 1000 }]
}
});
// Launch a renderer process
const window = new BrowserWindow({ show: false });
await window.webContents.loadFile(htmlPath);
// Launch a utility process
const utility = utilityProcess.fork(utilityProcessPath);
await once(utility, 'spawn');
// Collect heap dumps
// - We wait for a long time because sometimes processes take a few seconds to start sending heap dumps.
// - CI machines are slower, so we wait longer there than when running locally.
// - Sanitizer builds are slower still: a process is silently dropped from a dump unless both its
// Chrome dump and its OS memory maps arrive before stopRecording().
await setTimeout(isCI ? (process.env.IS_UBSAN ? 20000 : 10000) : 4000);
const path = await contentTracing.stopRecording();
const data = fs.readFileSync(path, 'utf8');
const parsed = JSON.parse(data);
const hasBrowserProcessHeapDump = hasNonEmptyHeapDumpForProcess(parsed, process.pid);
const hasRendererProcessHeapDump = hasNonEmptyHeapDumpForProcess(parsed, window.webContents.getOSProcessId());
const hasUtilityProcessHeapDump = hasNonEmptyHeapDumpForProcess(parsed, utility.pid);
global.setTimeout(() => require('electron').app.quit());
return {
hasBrowserProcessHeapDump,
hasRendererProcessHeapDump,
hasUtilityProcessHeapDump
};
},
path.join(fixturesPath, 'api', 'content-tracing', 'index.html'),
path.join(fixturesPath, 'api', 'content-tracing', 'utility.js'),
options,
isCI
);
const [code] = await once(rc.process, 'exit');
expect(code).to.equal(0);
return {
hasBrowserProcessHeapDump,
hasRendererProcessHeapDump,
hasUtilityProcessHeapDump
};
};
it('does not include heap dumps when enableHeapProfiling is not called', async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps(false);
expect(hasBrowserProcessHeapDump).to.be.false();
expect(hasRendererProcessHeapDump).to.be.false();
expect(hasUtilityProcessHeapDump).to.be.false();
});
ifit(!process.env.IS_ASAN)(
'includes heap dumps for browser process when called with { mode: "browser" }',
async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps({ mode: 'browser' });
expect(hasBrowserProcessHeapDump).to.be.true();
expect(hasRendererProcessHeapDump).to.be.false();
expect(hasUtilityProcessHeapDump).to.be.false();
}
);
ifit(!process.env.IS_ASAN)(
'includes heap dumps for renderer processes when called with { mode: "all-renderers" }',
async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps({ mode: 'all-renderers' });
expect(hasBrowserProcessHeapDump).to.be.false();
expect(hasRendererProcessHeapDump).to.be.true();
expect(hasUtilityProcessHeapDump).to.be.false();
}
);
ifit(!process.env.IS_ASAN)(
'includes heap dumps for utility processes when called with { mode: "all-utilities" }',
async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps({ mode: 'all-utilities' });
expect(hasBrowserProcessHeapDump).to.be.false();
expect(hasRendererProcessHeapDump).to.be.false();
expect(hasUtilityProcessHeapDump).to.be.true();
}
);
ifit(!process.env.IS_ASAN)(
'includes heap dumps for browser, renderer, and utility processes when called with { mode: "all" }',
async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps({ mode: 'all' });
expect(hasBrowserProcessHeapDump).to.be.true();
expect(hasRendererProcessHeapDump).to.be.true();
expect(hasUtilityProcessHeapDump).to.be.true();
}
);
ifit(!process.env.IS_ASAN)(
'includes heap dumps for browser, renderer, and utility processes when called without options',
async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps();
expect(hasBrowserProcessHeapDump).to.be.true();
expect(hasRendererProcessHeapDump).to.be.true();
expect(hasUtilityProcessHeapDump).to.be.true();
}
);
ifit(!process.env.IS_ASAN)('accepts valid options', async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps({
mode: 'all',
stackMode: 'native-with-thread-names',
samplingRate: 50000
});
expect(hasBrowserProcessHeapDump).to.be.true();
expect(hasRendererProcessHeapDump).to.be.true();
expect(hasUtilityProcessHeapDump).to.be.true();
});
ifit(!process.env.IS_ASAN)('does not crash when invalid options are passed', async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps({
// @ts-expect-error Invalid mode
mode: 'invalid',
// @ts-expect-error Invalid stack mode
stackMode: 'invalid',
samplingRate: -1000
});
expect(hasBrowserProcessHeapDump).to.be.true();
expect(hasRendererProcessHeapDump).to.be.true();
expect(hasUtilityProcessHeapDump).to.be.true();
});
ifit(!process.env.IS_ASAN)('does not crash when options of invalid types are passed', async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps({
// @ts-expect-error Invalid mode
mode: { invalid: true },
// @ts-expect-error Invalid stack mode
stackMode: 999,
// @ts-expect-error Invalid sampling rate
samplingRate: 'invalid'
});
expect(hasBrowserProcessHeapDump).to.be.true();
expect(hasRendererProcessHeapDump).to.be.true();
expect(hasUtilityProcessHeapDump).to.be.true();
});
ifit(!!process.env.IS_ASAN)('does not include heap dumps in ASAN builds', async function () {
const { hasBrowserProcessHeapDump, hasRendererProcessHeapDump, hasUtilityProcessHeapDump } =
await checkForHeapDumps();
expect(hasBrowserProcessHeapDump).to.be.false();
expect(hasRendererProcessHeapDump).to.be.false();
expect(hasUtilityProcessHeapDump).to.be.false();
});
ifit(!process.env.IS_ASAN)('rejects when called multiple times', async function () {
const rc = await startRemoteControlApp();
const [firstResult, secondResult, thirdResult] = await rc.remotely(async () => {
const { contentTracing } = require('electron');
// Call twice before enabling finishes.
const firstPromise = contentTracing.enableHeapProfiling();
const secondPromise = contentTracing.enableHeapProfiling();
const [firstResult, secondResult] = await Promise.allSettled([firstPromise, secondPromise]);
// Call again after enabling finishes.
const thirdPromise = contentTracing.enableHeapProfiling();
const [thirdResult] = await Promise.allSettled([thirdPromise]);
global.setTimeout(() => require('electron').app.quit());
return [firstResult, secondResult, thirdResult];
});
const [code] = await once(rc.process, 'exit');
expect(code).to.equal(0);
expect(firstResult.status).to.equal('fulfilled');
expect(secondResult.status).to.equal('rejected');
expect(secondResult.reason.message).to.equal('Heap profiling is already enabled');
expect(thirdResult.status).to.equal('rejected');
expect(thirdResult.reason.message).to.equal('Heap profiling is already enabled');
});
});
describe('captured events', () => {
it('include V8 samples from the main process', async function () {
this.timeout(60000);
-10
View File
@@ -1,10 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
-3
View File
@@ -1,3 +0,0 @@
setInterval(() => {
new Array(1000000).fill(0);
}, 100);