<?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>306868</bug_id>
          
          <creation_ts>2026-02-03 06:47:47 -0800</creation_ts>
          <short_desc>REGRESSION (306223@main): Remote Web Inspector broken</short_desc>
          <delta_ts>2026-02-03 10:55:14 -0800</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 Local Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=306234</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pablo Saavedra">psaavedra</reporter>
          <assigned_to name="Devin Rousso">hi</assigned_to>
          <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2177566</commentid>
    <comment_count>0</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2026-02-03 06:47:47 -0800</bug_when>
    <thetext>... in WPEWebKit , al least,  after replacing `getOrInitialize` with `getOrInsert`

After the following upstream commit was merged:

```
commit dd0d4ef9add2b1027a94058301a6714dee05c813
Author: Devin Rousso &lt;hi@devinrousso.com&gt;
Date:   Mon Jan 26 10:48:31 2026 -0800

    Web Inspector: remove `Map.prototype.getOrInitialize` in favor of `Map.prototype.getOrInsert`
    https://bugs.webkit.org/show_bug.cgi?id=306234
```

the **Remote Web Inspector** no longer works.

**Steps to Reproduce:**

1. Build WPE WebKit at or after commit `dd0d4ef9add2b1027a94058301a6714dee05c813`.  
2. Launch a WebKit‑based application (e.g. `MiniBrowser` or a remote web process) with the Web Inspector enabled.  
3. Connect via the remote inspector 
4. Observe that the inspector fails to initialize or crashes.

**Observed Result:**  
Inspector UI does not load.


```
  Uncaught TypeError:​ this._contentViewsForTarget.getOrInsert is not a function (at ScriptClusterTimelineView.js:​171:​56)​
    ?​ @ TypeError:​ this._contentViewsForTarget.getOrInsert is not a function
    ?​ @ ScriptClusterTimelineView.js:​171:​56)​
    ?​ @ ScriptClusterTimelineView.js:​64:​14)​
    ?​ @ ContentView.js:​87:​24)​
    ?​ @ TimelineRecordingContentView.js:​685:​60)​
    ?​ @ TimelineRecordingContentView.js:​121:​18)​
    ?​ @ ContentView.js:​76:​20)​
    ?​ @ ContentView.js:​220:​45)​
    ?​ @ ContentViewContainer.js:​68:​31)​
    ?​ @ ContentBrowser.js:​162:​43)​
    ?​ @ TimelineTabContentView.js:​651:​58)​

**Expected Result:**  

- Remote Web Inspector should load and function normally.

**Notes:**  

- Possible workaround: revert `dd0d4ef9` or manually re‑introduce shim for `Map.prototype.getOrInitialize`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177577</commentid>
    <comment_count>1</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2026-02-03 07:22:32 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/57783</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177611</commentid>
    <comment_count>2</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2026-02-03 09:15:38 -0800</bug_when>
    <thetext>https://github.com/WebKit/WebKit/pull/57783 fixes this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177638</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-02-03 10:54:10 -0800</bug_when>
    <thetext>Committed 306724@main (18398035e7a4): &lt;https://commits.webkit.org/306724@main&gt;

Reviewed commits have been landed. Closing PR #57783 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177639</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-02-03 10:55:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/169546674&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>