<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>315312</bug_id>
          
          <creation_ts>2026-05-21 12:29:17 -0700</creation_ts>
          <short_desc>Web Inspector: didCommitProvisionalPage should disable Inspector instrumentation for the old process to keep m_instrumentedProcessPageCounts accurate</short_desc>
          <delta_ts>2026-05-22 20:56:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://github.com/WebKit/WebKit/pull/65376</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>314902</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Blaze Burg">bburg</reporter>
          <assigned_to name="Blaze Burg">bburg</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2213047</commentid>
    <comment_count>0</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2026-05-21 12:29:17 -0700</bug_when>
    <thetext>Follow-up from PR #65376 (webkit.org/b/314902) review by Sihui Liu (szewai):

&gt; didCommitProvisionalPage doesn&apos;t call disableInstrumentationForProcess
&gt; for the old process, unlike didCommitProvisionalFrame which does. This
&gt; appears to be the specific code path where stale entries accumulate --
&gt; the Inspector SI tests like target-cross-origin-page-navigation.html
&gt; do main-frame cross-origin navigations that go through
&gt; didCommitProvisionalPage. Adding cleanup there would keep
&gt; m_instrumentedProcessPageCounts accurate at all times, not just at
&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2213048</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-05-21 12:29:23 -0700</bug_when>
    <thetext>&lt;rdar://problem/177644735&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2213475</commentid>
    <comment_count>2</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2026-05-22 20:56:10 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/65527</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>