Title: [151846] trunk/Source/WebInspectorUI
- Revision
- 151846
- Author
- [email protected]
- Date
- 2013-06-21 11:16:58 -0700 (Fri, 21 Jun 2013)
Log Message
Stop removing and re-adding breakpoints from the backend on reload.
On reload the sourceCode for breakpoints are nulled out, which fires DisplayLocationDidChange.
Then the sourceCode is reassociated, firing DisplayLocationDidChange again. In these cases we
don't need to update the backend, since nothing really changed.
https://bugs.webkit.org/show_bug.cgi?id=117877
Reviewed by Joseph Pecoraro.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._breakpointDisplayLocationDidChange): Return early when
_ignoreBreakpointDisplayLocationDidChangeEvent is true.
(WebInspector.DebuggerManager.prototype.reset): Set _ignoreBreakpointDisplayLocationDidChangeEvent.
(WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode): Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (151845 => 151846)
--- trunk/Source/WebInspectorUI/ChangeLog 2013-06-21 18:08:06 UTC (rev 151845)
+++ trunk/Source/WebInspectorUI/ChangeLog 2013-06-21 18:16:58 UTC (rev 151846)
@@ -1,3 +1,21 @@
+2013-06-21 Timothy Hatcher <[email protected]>
+
+ Stop removing and re-adding breakpoints from the backend on reload.
+
+ On reload the sourceCode for breakpoints are nulled out, which fires DisplayLocationDidChange.
+ Then the sourceCode is reassociated, firing DisplayLocationDidChange again. In these cases we
+ don't need to update the backend, since nothing really changed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=117877
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/DebuggerManager.js:
+ (WebInspector.DebuggerManager.prototype._breakpointDisplayLocationDidChange): Return early when
+ _ignoreBreakpointDisplayLocationDidChangeEvent is true.
+ (WebInspector.DebuggerManager.prototype.reset): Set _ignoreBreakpointDisplayLocationDidChangeEvent.
+ (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode): Ditto.
+
2013-06-19 Antoine Quint <[email protected]>
Web Inspector: Copying array or object output does not contain values
Modified: trunk/Source/WebInspectorUI/UserInterface/DebuggerManager.js (151845 => 151846)
--- trunk/Source/WebInspectorUI/UserInterface/DebuggerManager.js 2013-06-21 18:08:06 UTC (rev 151845)
+++ trunk/Source/WebInspectorUI/UserInterface/DebuggerManager.js 2013-06-21 18:16:58 UTC (rev 151846)
@@ -301,6 +301,8 @@
this._scriptIdMap = {};
this._scriptURLMap = {};
+ this._ignoreBreakpointDisplayLocationDidChangeEvent = true;
+
// Mark all the breakpoints as unresolved. They will be reported as resolved when
// breakpointResolved is called as the page loads.
for (var i = 0; i < this._breakpoints.length; ++i) {
@@ -310,6 +312,8 @@
breakpoint.sourceCodeLocation.sourceCode = null;
}
+ delete this._ignoreBreakpointDisplayLocationDidChangeEvent;
+
this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.ScriptsCleared);
if (wasPaused)
@@ -511,6 +515,9 @@
_breakpointDisplayLocationDidChange: function(event)
{
+ if (this._ignoreBreakpointDisplayLocationDidChangeEvent)
+ return;
+
var breakpoint = event.target;
if (!breakpoint.id || breakpoint.disabled)
return;
@@ -620,6 +627,8 @@
_associateBreakpointsWithSourceCode: function(breakpoints, sourceCode)
{
+ this._ignoreBreakpointDisplayLocationDidChangeEvent = true;
+
for (var i = 0; i < breakpoints.length; ++i) {
var breakpoint = breakpoints[i];
if (breakpoint.sourceCodeLocation.sourceCode === null)
@@ -627,6 +636,8 @@
// SourceCodes can be unequal if the SourceCodeLocation is associated with a Script and we are looking at the Resource.
console.assert(breakpoint.sourceCodeLocation.sourceCode === sourceCode || breakpoint.sourceCodeLocation.sourceCode.url ="" sourceCode.url);
}
+
+ delete this._ignoreBreakpointDisplayLocationDidChangeEvent;
}
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes