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

Unified Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Issue 2484283004: [DevTools] added BreakpointManager.possibleBreakpoints method (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 | « third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
index e21ccfac1f4a60627e133ba27fc04079f77d3e2d..466760c4472fb45a9438172a56c7032edbd560ae 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
@@ -706,6 +706,27 @@ WebInspector.UILocation = class {
toUIString() {
return this.uiSourceCode.url() + ':' + (this.lineNumber + 1);
}
+
+ /**
+ * @param {!WebInspector.UILocation} location1
+ * @param {!WebInspector.UILocation} location2
+ * @return {number}
+ */
+ static comparator(location1, location2) {
+ return location1.compareTo(location2);
+ }
+
+ /**
+ * @param {!WebInspector.UILocation} other
+ * @return {number}
+ */
+ compareTo(other) {
+ if (this.uiSourceCode.url() !== other.uiSourceCode.url())
+ return this.uiSourceCode.url() > other.uiSourceCode.url() ? 1 : -1;
+ if (this.lineNumber !== other.lineNumber)
+ return this.lineNumber - other.lineNumber;
+ return this.columnNumber - other.columnNumber;
+ }
};
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698