Web Inspector: XHR breakpoints shouldn't be cleared from the sidebar on reload
[WebKit-https.git] / Source / WebInspectorUI / UserInterface / Controllers / XHRBreakpointTreeController.js
index 2d10e29..f8c8951 100644 (file)
@@ -31,8 +31,6 @@ WebInspector.XHRBreakpointTreeController = class XHRBreakpointsTreeController ex
 
         this._treeOutline = treeOutline;
 
-        WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
-
         WebInspector.domDebuggerManager.addEventListener(WebInspector.DOMDebuggerManager.Event.XHRBreakpointAdded, this._xhrBreakpointAdded, this);
         WebInspector.domDebuggerManager.addEventListener(WebInspector.DOMDebuggerManager.Event.XHRBreakpointRemoved, this._xhrBreakpointRemoved, this);
 
@@ -78,15 +76,6 @@ WebInspector.XHRBreakpointTreeController = class XHRBreakpointsTreeController ex
         this._treeOutline.removeChild(treeElement);
     }
 
-    _mainResourceDidChange(event)
-    {
-        if (!event.target.isMainFrame())
-            return;
-
-        while (this._treeOutline.children.length > 1)
-            this._treeOutline.removeChild(this._treeOutline.children.lastValue);
-    }
-
     _addTreeElement(breakpoint)
     {
         let treeElement = this._treeOutline.findTreeElement(breakpoint);