Skip to content

Commit 019d3f0

Browse files
committed
fix: disable protocol handler DCHECK
https://chromium-review.googlesource.com/c/chromium/src/+/6727594 Ignore the extension custom protocol handler registry DCHECK until we invest in supporting it. Replacing this DCHECK seems harmless and will unblock the roll.
1 parent 2d539b0 commit 019d3f0

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

patches/chromium/.patches

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,4 @@ chore_expose_isolate_parameter_in_script_lifecycle_observers.patch
140140
revert_partial_remove_unused_prehandlemouseevent.patch
141141
allow_electron_to_depend_on_components_os_crypt_sync.patch
142142
expose_referrerscriptinfo_hostdefinedoptionsindex.patch
143+
chore_disable_protocol_handler_dcheck.patch
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Samuel Maddock <[email protected]>
3+
Date: Thu, 9 Oct 2025 22:07:38 -0400
4+
Subject: chore: disable protocol handler dcheck
5+
6+
https://chromium-review.googlesource.com/c/chromium/src/+/6727594
7+
8+
The above CL introduces a new extensions API to register custom protocol
9+
handlers. A DCHECK causes Electron to crash until we provide our own
10+
registry. This patch disables the check until we support this.
11+
12+
diff --git a/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc b/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc
13+
index 902cf488c7d84923365c4197a70b06e61e3af038..dce80684853f89a68a2d21997102f48feb3df8f8 100644
14+
--- a/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc
15+
+++ b/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc
16+
@@ -129,7 +129,12 @@ void ProtocolHandlersManager::ProtocolHandlersSanityCheck() {
17+
auto* ph_registry =
18+
ExtensionsBrowserClient::Get()->GetProtocolHandlerRegistry(
19+
browser_context_);
20+
- DCHECK(ph_registry);
21+
+
22+
+ // TODO(samuelmaddock): Add support for extensions protocol handler. For now,
23+
+ // let's ignore this.
24+
+ if (!ph_registry)
25+
+ return;
26+
+
27+
for (const auto& handler : ph_registry->GetExtensionProtocolHandlers()) {
28+
DCHECK(handler.extension_id());
29+
if (!enabled_ids.contains(*handler.extension_id())) {

0 commit comments

Comments
 (0)