[2026-09-09] eagle: work/projects/cpm-web-extension-breakage-findings.md
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user