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

Unified Diff: third_party/WebKit/Source/devtools/front_end/platform/utilities.js

Issue 2562193002: Add filtering by priority in the Network filter area. (Closed)
Patch Set: Changes Created 4 years 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: third_party/WebKit/Source/devtools/front_end/platform/utilities.js
diff --git a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
index 23ed78cb293c69b136a8ad445767e769a3dbe648..327c6e44274adfcd19ff619c44dd952547c93ae5 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
@@ -484,6 +484,7 @@ Object.defineProperty(Array.prototype, 'rotate', {
Object.defineProperty(Array.prototype, 'sortNumbers', {
/**
* @this {Array.<number>}
+ * @return {!Array.<number>}
allada 2016/12/20 01:35:00 I didn't realize sort() sorted in place. Lets foll
*/
value: function() {
/**
@@ -495,7 +496,7 @@ Object.defineProperty(Array.prototype, 'sortNumbers', {
return a - b;
}
- this.sort(numericComparator);
+ return this.sort(numericComparator);
allada 2016/12/20 01:35:00 and this.
}
});
@@ -1153,10 +1154,11 @@ Map.prototype.keysArray = function() {
};
/**
- * @return {!Multimap<!KEY, !VALUE>}
+ * @param {!Object=} config
+ * @return {!Multimap<!KEY, !VALUE>|!Map<!KEY, !VALUE>}
*/
-Map.prototype.inverse = function() {
- var result = new Multimap();
+Map.prototype.inverse = function(config) {
+ var result = (config && config.regularMap) ? new Map() : new Multimap();
allada 2016/12/20 01:35:00 I spoke to one of the members of our team and he d
for (var key of this.keys()) {
var value = this.get(key);
result.set(value, key);

Powered by Google App Engine
This is Rietveld 408576698