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); |