From 5eb6f73375b29310f491bde53d6baa5d34f5aee0 Mon Sep 17 00:00:00 2001 From: arzafran Date: Tue, 11 Aug 2026 15:34:45 -0300 Subject: [PATCH] fix: disable Chrome's Reading Mode to stop soft-navigation crashes Any site performing a soft navigation (History API / same-document, the standard SPA pattern) could take down the whole browser process: Chrome's ReadAnythingSoftNavigationObserver ships in CEF without the profile plumbing it expects and dereferences null on the first OnSoftNavigation callback. Root-caused by symbolicating a field crash (build 85, wakawaka.world internal page -> home) against CEF's published dSYMs. Disabling the ReadAnything feature removes the observer entirely; the switch merges with CEF's own disable-features list rather than clobbering it. --- src/bro_app.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/bro_app.cc b/src/bro_app.cc index a10be8f..58626bb 100644 --- a/src/bro_app.cc +++ b/src/bro_app.cc @@ -4,6 +4,8 @@ #include "bro_app.h" +#include + #include "include/cef_command_line.h" #include "include/wrapper/cef_helpers.h" #include "bro_handler.h" @@ -27,6 +29,24 @@ void BroApp::OnBeforeCommandLineProcessing( command_line->AppendSwitch("enable-gpu"); command_line->AppendSwitchWithValue("use-angle", "metal"); command_line->AppendSwitch("ignore-gpu-blocklist"); + + // Chrome's Reading Mode ships in CEF without the profile plumbing it + // expects: its ReadAnythingSoftNavigationObserver dereferences a null + // coordinator the moment any page performs a soft navigation (History API / + // same-document), taking the whole browser process down. Symbolicated from + // a field crash on wakawaka.world, 2026-08-11 (build 85). Disabling the + // feature removes the observer; merge with any existing list rather than + // clobbering the features CEF disables on its own. + const char kDisableFeatures[] = "disable-features"; + std::string disabled = + command_line->HasSwitch(kDisableFeatures) + ? command_line->GetSwitchValue(kDisableFeatures).ToString() + : std::string(); + if (!disabled.empty()) { + disabled += ","; + } + disabled += "ReadAnything"; + command_line->AppendSwitchWithValue(kDisableFeatures, disabled); } void BroApp::OnContextInitialized() {