From 1f80b0736136e8932dc160ab51205661c1a0408b Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Wed, 9 Sep 2026 18:08:37 +0600 Subject: [PATCH] [2026-09-09] eagle: work/projects/cpm-web-extension-breakage-findings.md --- work/projects/cpm-web-extension-breakage-findings.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/work/projects/cpm-web-extension-breakage-findings.md b/work/projects/cpm-web-extension-breakage-findings.md index 8ae762a6..20d022a0 100644 --- a/work/projects/cpm-web-extension-breakage-findings.md +++ b/work/projects/cpm-web-extension-breakage-findings.md @@ -964,3 +964,12 @@ Verification without the marker: Safari Develop → DuckDuckGo → tab A → the ### Answer to "can one crashed/hung page affect extensions in other tabs?" Not through WebKit: the background service-worker page gets its own WebContent process (fresh/prewarmed process at creation, `_relatedWebView` is nil for CPM), content-script messaging is per tab/process, and a WebContent crash only drops that process's frames from the listener map. The only cross-tab couplings are app-side: the shared `WebExtensionManager` state (router, controller) and the background SW's single JS thread, whose per-tab handlers are independent except the `_stateQueue` (which only carries dashboard state, and catches errors). The breakage reports with `waiting` on crashed pages are the *page* not committing, not CPM being affected by another tab. + + +### RETRACTED: `removeAllUserScripts()` does not strip extension scripts (tested 2026-09-09) + +Manual test: `removeAllUserScripts()` on a tab's controller leaves CPM working. Source confirms: the public API maps to `WebUserContentControllerProxy::removeAllUserScripts(RemoveWebExtensions::No)`, which skips every script whose URL is a `webkit-extension://` URL (`WebUserContentControllerProxy.cpp:227-266`). The Duck.ai refresher and the iOS `removeInstalledUserScripts()` path are therefore harmless to CPM. `tab_has_extension_user_scripts` stays in the diagnostics (cheap, still a valid sanity check) but is no longer expected to flip. + +### Tab lifecycle paths checked (all correct) + +`pinTab`/`unpinTab`, `moveTab(at:to:at:)` between windows, drag-out `moveToNewWindow`, `suspendTab`/`materialize` (`TabCollectionViewModel.swift:864-878, 885-897, 734-757`, `TabBarViewController.swift:1508-1524`, `TabCollection.swift:255-283`) all either suppress open/close or emit the correct pair. No path found that leaves a live tab unknown to WebKit.