Bug 315312

Summary: Web Inspector: didCommitProvisionalPage should disable Inspector instrumentation for the old process to keep m_instrumentedProcessPageCounts accurate
Product: WebKit Reporter: Blaze Burg <bburg>
Component: Web InspectorAssignee: Blaze Burg <bburg>
Status: NEW    
Severity: Normal CC: inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/WebKit/WebKit/pull/65376
Bug Depends on: 314902    
Bug Blocks:    

Blaze Burg
Reported 2026-05-21 12:29:17 PDT
Follow-up from PR #65376 (webkit.org/b/314902) review by Sihui Liu (szewai): > didCommitProvisionalPage doesn't call disableInstrumentationForProcess > for the old process, unlike didCommitProvisionalFrame which does. This > appears to be the specific code path where stale entries accumulate -- > the Inspector SI tests like target-cross-origin-page-navigation.html > do main-frame cross-origin navigations that go through > didCommitProvisionalPage. Adding cleanup there would keep > m_instrumentedProcessPageCounts accurate at all times, not just at > teardown. PR #65376 already resolves the receiver-leak assertion via a destructor backstop (~ProxyingNetworkAgent calling removeAllRegisteredReceivers). That fix is sufficient to land. This bug tracks the deeper cleanup: mirror the disableInstrumentationForProcess call from WebPageInspectorController::didCommitProvisionalFrame into the didCommitProvisionalPage path so per-process counts stay accurate during normal navigation lifecycles, not only at WebPageProxy teardown. Repro test: http/tests/site-isolation/inspector/target-cross-origin-page-navigation.html
Attachments
Radar WebKit Bug Importer
Comment 1 2026-05-21 12:29:23 PDT
Blaze Burg
Comment 2 2026-05-22 20:56:10 PDT
Note You need to log in before you can comment on or make changes to this bug.