Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1729)

Unified Diff: Source/devtools/front_end/BreakpointManager.js

Issue 15096004: Passing hit breakpoint IDs to ScriptDebugServer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/BreakpointManager.js
diff --git a/Source/devtools/front_end/BreakpointManager.js b/Source/devtools/front_end/BreakpointManager.js
index 02910f7391a4bc67fe8400985127b0b120ea3d72..e0567e571562e846e57d7980c42f583e57166316 100644
--- a/Source/devtools/front_end/BreakpointManager.js
+++ b/Source/devtools/front_end/BreakpointManager.js
@@ -507,45 +507,45 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
var rawLocation = this._primaryUILocation.uiLocationToRawLocation();
var debuggerModelLocation = /** @type {WebInspector.DebuggerModel.Location} */ (rawLocation);
if (debuggerModelLocation)
- this._breakpointManager._debuggerModel.setBreakpointByScriptLocation(debuggerModelLocation, this._condition, didSetBreakpoint.bind(this));
+ this._breakpointManager._debuggerModel.setBreakpointByScriptLocation(debuggerModelLocation, this._condition, this._didSetBreakpointInDebugger.bind(this));
else
- this._breakpointManager._debuggerModel.setBreakpointByURL(this._primaryUILocation.uiSourceCode.url, this._primaryUILocation.lineNumber, 0, this._condition, didSetBreakpoint.bind(this));
-
- /**
- * @this {WebInspector.BreakpointManager.Breakpoint}
- * @param {?DebuggerAgent.BreakpointId} breakpointId
- * @param {Array.<WebInspector.DebuggerModel.Location>} locations
- */
- function didSetBreakpoint(breakpointId, locations)
- {
- if (!breakpointId) {
- this._resetLocations();
- this._breakpointManager._removeBreakpoint(this, false);
- return;
- }
+ this._breakpointManager._debuggerModel.setBreakpointByURL(this._primaryUILocation.uiSourceCode.url, this._primaryUILocation.lineNumber, 0, this._condition, this._didSetBreakpointInDebugger.bind(this));
+ },
- this._debuggerId = breakpointId;
- this._breakpointManager._breakpointForDebuggerId[breakpointId] = this;
+ /**
+ * @this {WebInspector.BreakpointManager.Breakpoint}
+ * @param {?DebuggerAgent.BreakpointId} breakpointId
+ * @param {Array.<WebInspector.DebuggerModel.Location>} locations
+ */
+ _didSetBreakpointInDebugger: function(breakpointId, locations)
+ {
+ if (!breakpointId) {
+ this._resetLocations();
+ this._breakpointManager._removeBreakpoint(this, false);
+ return;
+ }
- if (!locations.length) {
- this._fakeBreakpointAtPrimaryLocation();
- return;
- }
+ this._debuggerId = breakpointId;
+ this._breakpointManager._breakpointForDebuggerId[breakpointId] = this;
- this._resetLocations();
- for (var i = 0; i < locations.length; ++i) {
- var script = this._breakpointManager._debuggerModel.scriptForId(locations[i].scriptId);
- var uiLocation = script.rawLocationToUILocation(locations[i].lineNumber, locations[i].columnNumber);
- if (this._breakpointManager.findBreakpoint(uiLocation.uiSourceCode, uiLocation.lineNumber)) {
- // location clash
- this.remove();
- return;
- }
- }
+ if (!locations.length) {
+ this._fakeBreakpointAtPrimaryLocation();
+ return;
+ }
- for (var i = 0; i < locations.length; ++i)
- this._addResolvedLocation(locations[i]);
+ this._resetLocations();
+ for (var i = 0; i < locations.length; ++i) {
+ var script = this._breakpointManager._debuggerModel.scriptForId(locations[i].scriptId);
+ var uiLocation = script.rawLocationToUILocation(locations[i].lineNumber, locations[i].columnNumber);
+ if (this._breakpointManager.findBreakpoint(uiLocation.uiSourceCode, uiLocation.lineNumber)) {
+ // location clash
+ this.remove();
+ return;
+ }
}
+
+ for (var i = 0; i < locations.length; ++i)
+ this._addResolvedLocation(locations[i]);
},
_removeFromDebugger: function()

Powered by Google App Engine
This is Rietveld 408576698