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

Unified Diff: Source/WebCore/inspector/front-end/BreakpointManager.js

Issue 11048015: Merge 129775 - Web Inspector: [REGRESSION] Breakpoints are not always shown in breakpoints sidebar … (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/front-end/BreakpointManager.js
===================================================================
--- Source/WebCore/inspector/front-end/BreakpointManager.js (revision 130257)
+++ Source/WebCore/inspector/front-end/BreakpointManager.js (working copy)
@@ -133,17 +133,17 @@
},
/**
- * @param {WebInspector.UISourceCode} uiSourceCode
- * @return {Array.<Object>}
+ * @param {function(WebInspector.BreakpointManager.Breakpoint, WebInspector.UILocation)} filter
+ * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
*/
- breakpointLocationsForUISourceCode: function(uiSourceCode)
+ _filteredBreakpointLocations: function(filter)
{
var result = [];
for (var i = 0; i < this._breakpoints.length; ++i) {
var breakpoint = this._breakpoints[i];
for (var stringifiedLocation in breakpoint._uiLocations) {
var uiLocation = breakpoint._uiLocations[stringifiedLocation];
- if (uiLocation.uiSourceCode === uiSourceCode)
+ if (filter(breakpoint, uiLocation))
result.push({breakpoint: breakpoint, uiLocation: uiLocation});
}
}
@@ -151,6 +151,28 @@
},
/**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
+ */
+ breakpointLocationsForUISourceCode: function(uiSourceCode)
+ {
+ function filter(breakpoint, uiLocation)
+ {
+ return uiLocation.uiSourceCode === uiSourceCode;
+ }
+
+ return this._filteredBreakpointLocations(filter);
+ },
+
+ /**
+ * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
+ */
+ allBreakpointLocations: function()
+ {
+ return this._filteredBreakpointLocations(function(breakpoint, uiLocation) { return true; });
+ },
+
+ /**
* @param {boolean} toggleState
*/
toggleAllBreakpoints: function(toggleState)
« no previous file with comments | « no previous file | Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698