mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Upstream relaxed the DCHECK(ph_registry) to handle tests using dummy profiles that lack the required testing factory. Changed to early return with CHECK_IS_TEST(). Our patch already had an early return but updated comment context to match upstream changes while preserving our behavior (removing CHECK_IS_TEST). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7116098
28 lines
1.3 KiB
Diff
28 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Maddock <smaddock@slack-corp.com>
|
|
Date: Thu, 9 Oct 2025 22:07:38 -0400
|
|
Subject: chore: disable protocol handler dcheck
|
|
|
|
https://chromium-review.googlesource.com/c/chromium/src/+/6727594
|
|
|
|
The above CL introduces a new extensions API to register custom protocol
|
|
handlers. A DCHECK causes Electron to crash until we provide our own
|
|
registry. This patch disables the check until we support this.
|
|
|
|
diff --git a/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc b/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc
|
|
index 7f26a1c3a63c8717705cbf6fe09ca3812450e15d..a0a483c7921553ce83be084f9a6dbd0c935c9fca 100644
|
|
--- a/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc
|
|
+++ b/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc
|
|
@@ -138,9 +138,9 @@ void ProtocolHandlersManager::ProtocolHandlersSanityCheck() {
|
|
auto* ph_registry =
|
|
ExtensionsBrowserClient::Get()->GetProtocolHandlerRegistry(
|
|
browser_context_);
|
|
- // Can be null for tests using dummy profiles.
|
|
+ // TODO(samuelmaddock): Add support for extensions protocol handler. For now,
|
|
+ // let's ignore this.
|
|
if (!ph_registry) {
|
|
- CHECK_IS_TEST();
|
|
return;
|
|
}
|
|
for (const auto& handler : ph_registry->GetExtensionProtocolHandlers()) {
|