electron/patches/chromium/revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
2.2 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
Date: Tue, 5 Sep 2023 13:22:31 -0700
Subject: Revert "Remove the AllowAggressiveThrottlingWithWebSocket feature."
This reverts commit 615c1810a187840ffeb04096087efff86edb37de.
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
chore: bump chromium to 140.0.7314.0 (38-x-y) (#47903) * chore: bump chromium in DEPS to 140.0.7314.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: node gen-libc++-filenames.js Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-29 11:00:54 -04:00
index b5dde9f0b46663db5c7cf072cc58e271f83995eb..88a503e23ea4fa787a91a2a7934dc1783264a700 100644
--- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
+++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
chore: bump chromium to 140.0.7301.0 (38-x-y) (#47849) * chore: bump chromium in DEPS to 140.0.7296.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6702959: Remove OwnedByWidgetPassKey usage from content analysis dialog tests | https://chromium-review.googlesource.com/c/chromium/src/+/6702959 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6722750: Remove un-used `stream_id` argument for `AidaCodeComplete` | https://chromium-review.googlesource.com/c/chromium/src/+/6722750 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6696478: Reland Reland [video pip] Add fade in/out animation to controls visibility changes | https://chromium-review.googlesource.com/c/chromium/src/+/6696478 Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * chore: update libc++-filenames Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * build: explicitly include cstdlib in Boyer-Moore patch Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * chore: bump chromium in DEPS to 140.0.7297.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6729537: [FPF] Pipe flag state from the browser to the renderer | https://chromium-review.googlesource.com/c/chromium/src/+/6729537 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6727996: [Win] Detect pre-IPC crashes in sandboxed utility processes | https://chromium-review.googlesource.com/c/chromium/src/+/6727996 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6707182: Move wtf/cross_thread_copier*.* to "blink" namespace | https://chromium-review.googlesource.com/c/chromium/src/+/6707182 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: bump chromium in DEPS to 140.0.7299.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com> * chore: update main patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * build: reset the minimum macOS SDK to 15 to match upstream This reverts commit 499e987c777baac6f71f8bef2470055961143663. Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6730215: Remove IPC_MESSAGE_LOG_ENABLED ifdef blocks. | https://chromium-review.googlesource.com/c/chromium/src/+/6730215 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6690442: Delete ppapi/buildflags/buildflags.h | https://chromium-review.googlesource.com/c/chromium/src/+/6690442 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: bump chromium in DEPS to 140.0.7301.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6656309: extensions: Port proxy API to desktop Android | https://chromium-review.googlesource.com/c/chromium/src/+/6656309 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6758510: Reland 'Move GN enable_plugins variable out of //ppapi' | https://chromium-review.googlesource.com/c/chromium/src/+/6758510 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6735979: [FSA] Replace `request_writable` with a new enum `FileSystemAccessPermissionMode`. | https://chromium-review.googlesource.com/c/chromium/src/+/6735979 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6712080: Reland "Turn on gender translation PAK generation everywhere" | https://chromium-review.googlesource.com/c/chromium/src/+/6712080 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * build: restore minimum macOS SDK to 10, restore patch This reverts commit a04c579b994d5f4a782b793a69f34ff7a260e74f. Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * fixup! 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: correct node patches Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * fixup! 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-21 11:55:08 -07:00
@@ -101,6 +101,17 @@ enum WebSocketOpCode {
kOpCodeBinary = 0x2,
};
+// When enabled, a page can be aggressively throttled even if it uses a
+// WebSocket. Aggressive throttling does not affect the execution of WebSocket
+// event handlers, so there is little reason to disable it on pages using a
+// WebSocket.
+//
+// TODO(crbug.com/1121725): Cleanup this feature in June 2021, when it becomes
+// enabled by default on Stable.
+BASE_FEATURE(kAllowAggressiveThrottlingWithWebSocket,
+ "AllowAggressiveThrottlingWithWebSocket",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
} // namespace
chore: bump chromium to 131.0.6734.0 (main) (#43769) * chore: bump chromium in DEPS to 130.0.6723.4 * chore: bump chromium in DEPS to 131.0.6724.0 * chore: update patches * chore: update libc++ filenames * 5844369: controlledframe: Disable Web Bluetooth for <webview> & <controlledframe> https://chromium-review.googlesource.com/c/chromium/src/+/5844369 * (multiple CLs): Use an opaque type for FrameTreeNode IDs 5807683: Use an opaque type for FrameTreeNode IDs, part 1 | https://chromium-review.googlesource.com/c/chromium/src/+/5807683 5829746: Use an opaque type for FrameTreeNode IDs, part 2 | https://chromium-review.googlesource.com/c/chromium/src/+/5829746 5836903: Use an opaque type for FrameTreeNode IDs, part 7 | https://chromium-review.googlesource.com/c/chromium/src/+/5836903 5837249: Use an opaque type for FrameTreeNode IDs, part 8 | https://chromium-review.googlesource.com/c/chromium/src/+/5837249 5836564: Use an opaque type for FrameTreeNode IDs, part 12 | https://chromium-review.googlesource.com/c/chromium/src/+/5836564 5837180: Use an opaque type for FrameTreeNode IDs, part 15 | https://chromium-review.googlesource.com/c/chromium/src/+/5837180 * 5822889: [task] Make GetForegroundTaskRunner non-virtual https://chromium-review.googlesource.com/c/v8/v8/+/5822889 * 5833297: Remove unused inner WebContents attach params https://chromium-review.googlesource.com/c/chromium/src/+/5833297 * 5806403: Shift PowerMonitor to non static https://chromium-review.googlesource.com/c/chromium/src/+/5806403 * 5666874: [3/N] Remove old OnPowerChange in PowerObserver https://chromium-review.googlesource.com/c/chromium/src/+/5666874 * 5829085: [v8] Differentiate between UserVisible and BestEffort task runners https://chromium-review.googlesource.com/c/chromium/src/+/5829085 * 5791112: [webrtc] Use `c/b/permissions/system` for system permissions https://chromium-review.googlesource.com/c/chromium/src/+/5791112 * 5825636: [Extensions] Create WebContentsObservers with ExtensionsBrowserClient https://chromium-review.googlesource.com/c/chromium/src/+/5825636 * fixup! (multiple CLs): Use an opaque type for FrameTreeNode IDs * fixup! 5791112: [webrtc] Use `c/b/permissions/system` for system permissions https://chromium-review.googlesource.com/c/chromium/src/+/5791112 * chore: bump chromium in DEPS to 131.0.6726.0 * chore: update patches * chore: update libc++ filenames * 5858119: Declutter: Allow opening to a specific feature https://chromium-review.googlesource.com/c/chromium/src/+/5858119 * fix: macOS SDK 15 error Not sure exactly what changed in the upgrade to macOS SDK 15, but it triggered a new error: ``` electron/shell/browser/ui/message_box_mac.mm:84:7: error: multiple methods named 'highlight:' found with mismatched result, parameter type or attributes ``` The `highlight:` selector a few lines down was ambiguous because the object type of the `NSArray` was not specified. Specifying `NSButton` as the element type makes the selector unambiguous for type checking. * 5854143: [File Download Access Prevention] Obfuscate download file for enterprise deep scan https://chromium-review.googlesource.com/c/chromium/src/+/5854143 * 5854811: Use kNotAllowedError instead of kSecurityError for Web MIDI https://chromium-review.googlesource.com/c/chromium/src/+/5854811 * chore: bump chromium in DEPS to 131.0.6728.0 * chore: update patches * disable invalid test * chore: bump chromium in DEPS to 131.0.6730.0 * chore: update patches * update build tools target commit for new macOS SDK * chore: update libc++ file names * chore: bump chromium in DEPS to 131.0.6732.0 * chore: bump chromium in DEPS to 131.0.6734.0 * 5856527: [UI] Use mojo enum for `WindowShowState` in ui/ https://chromium-review.googlesource.com/c/chromium/src/+/5856527 * chore: update build-tools sha to include macOD 15.0 SDK --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: alice <alice@makenotion.com>
2024-09-25 06:19:39 -05:00
WebSocketChannelImpl::MessageDataDeleter::MessageDataDeleter(
chore: bump chromium to 140.0.7301.0 (38-x-y) (#47849) * chore: bump chromium in DEPS to 140.0.7296.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6702959: Remove OwnedByWidgetPassKey usage from content analysis dialog tests | https://chromium-review.googlesource.com/c/chromium/src/+/6702959 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6722750: Remove un-used `stream_id` argument for `AidaCodeComplete` | https://chromium-review.googlesource.com/c/chromium/src/+/6722750 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6696478: Reland Reland [video pip] Add fade in/out animation to controls visibility changes | https://chromium-review.googlesource.com/c/chromium/src/+/6696478 Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * chore: update libc++-filenames Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * build: explicitly include cstdlib in Boyer-Moore patch Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * chore: bump chromium in DEPS to 140.0.7297.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6729537: [FPF] Pipe flag state from the browser to the renderer | https://chromium-review.googlesource.com/c/chromium/src/+/6729537 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6727996: [Win] Detect pre-IPC crashes in sandboxed utility processes | https://chromium-review.googlesource.com/c/chromium/src/+/6727996 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6707182: Move wtf/cross_thread_copier*.* to "blink" namespace | https://chromium-review.googlesource.com/c/chromium/src/+/6707182 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: bump chromium in DEPS to 140.0.7299.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com> * chore: update main patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * build: reset the minimum macOS SDK to 15 to match upstream This reverts commit 499e987c777baac6f71f8bef2470055961143663. Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6730215: Remove IPC_MESSAGE_LOG_ENABLED ifdef blocks. | https://chromium-review.googlesource.com/c/chromium/src/+/6730215 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6690442: Delete ppapi/buildflags/buildflags.h | https://chromium-review.googlesource.com/c/chromium/src/+/6690442 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: bump chromium in DEPS to 140.0.7301.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6656309: extensions: Port proxy API to desktop Android | https://chromium-review.googlesource.com/c/chromium/src/+/6656309 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6758510: Reland 'Move GN enable_plugins variable out of //ppapi' | https://chromium-review.googlesource.com/c/chromium/src/+/6758510 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6735979: [FSA] Replace `request_writable` with a new enum `FileSystemAccessPermissionMode`. | https://chromium-review.googlesource.com/c/chromium/src/+/6735979 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6712080: Reland "Turn on gender translation PAK generation everywhere" | https://chromium-review.googlesource.com/c/chromium/src/+/6712080 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * 6730796: extensions: Extract safe browsing/telemetry methods to new client class | https://chromium-review.googlesource.com/c/chromium/src/+/6730796 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * build: restore minimum macOS SDK to 10, restore patch This reverts commit a04c579b994d5f4a782b793a69f34ff7a260e74f. Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * fixup! 6701466: [Extensions] Remove NaCl arch info from Update Client URLs | https://chromium-review.googlesource.com/c/chromium/src/+/6701466 Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * chore: correct node patches Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * fixup! 6667681: Use more binaries from clang toolchain in mac build | https://chromium-review.googlesource.com/c/chromium/src/+/6667681 Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-07-21 11:55:08 -07:00
@@ -294,7 +305,10 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) {
// even if the `WebSocketChannel` is closed.
feature_handle_for_scheduler_ = scheduler->RegisterFeature(
SchedulingPolicy::Feature::kWebSocket,
- SchedulingPolicy{SchedulingPolicy::DisableBackForwardCache()});
+ base::FeatureList::IsEnabled(kAllowAggressiveThrottlingWithWebSocket)
+ ? SchedulingPolicy{SchedulingPolicy::DisableBackForwardCache()}
+ : SchedulingPolicy{SchedulingPolicy::DisableAggressiveThrottling(),
+ SchedulingPolicy::DisableBackForwardCache()});
scheduler->RegisterStickyFeature(
SchedulingPolicy::Feature::kWebSocketSticky,
SchedulingPolicy{SchedulingPolicy::DisableBackForwardCache()});