<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: REGRESSION(Tabs): Issues reloading a resource with breakpoints"
   href="https://bugs.webkit.org/show_bug.cgi?id=144650#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: REGRESSION(Tabs): Issues reloading a resource with breakpoints"
   href="https://bugs.webkit.org/show_bug.cgi?id=144650">bug 144650</a>
              from <span class="vcard"><a class="email" href="mailto:timothy&#64;apple.com" title="Timothy Hatcher &lt;timothy&#64;apple.com&gt;"> <span class="fn">Timothy Hatcher</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=252441&amp;action=diff" name="attach_252441" title="[PATCH] Progress">attachment 252441</a> <a href="attachment.cgi?id=252441&amp;action=edit" title="[PATCH] Progress">[details]</a></span>
[PATCH] Progress

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=252441&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=252441&amp;action=review</a>

<span class="quote">&gt; Source/WebInspectorUI/UserInterface/Views/ContentView.js:124
&gt; +        console.error(&quot;Unknown ContentView&quot;, representedObject);
&gt; +
&gt;          throw &quot;Can't make a ContentView for an unknown representedObject.&quot;;</span >

I've been considering removing the throw here and just doing a console.error.

<span class="quote">&gt; Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:393
&gt; +        for (var i = this._breakpointsContentTreeOutline.children.length - 1; i &gt;= 0; --i) {
&gt; +            var treeElement = this._breakpointsContentTreeOutline.children[i];
&gt; +            if (treeElement !== this._globalBreakpointsFolderTreeElement)
&gt; +                this._breakpointsContentTreeOutline.removeChildAtIndex(i, true, true);
&gt; +        }</span >

You should not need to do this. DebuggerSidebarPanel opts-in to NavigationSidebarPanel's autoPruneOldTopLevelResourceTreeElements. That will remove ResourceTreeElements that go away on MainResourceDidChange, ChildFrameWasRemoved, and ResourceWasRemoved events. The closeAllContentViews is all we should need.

<span class="quote">&gt; Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:429
&gt; +        // FIXME: Is this needed, now that we clear everything on main resource changes?</span >

Yes, since NavigationSidebarPanel does not auto-prune these.

<span class="quote">&gt; Source/WebInspectorUI/UserInterface/Views/TabContentView.js:127
&gt; -        var cookie = this._cookieSetting.value || {};
&gt; +        var cookie = {};</span >

Ah, yes. I see how this was wrong now.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>