Index: Source/devtools/front_end/utilities.js |
diff --git a/Source/devtools/front_end/utilities.js b/Source/devtools/front_end/utilities.js |
index b71989faf990a879692f2a0b55a2c18d92babcc4..34426db7e17b3dc59582bd21c2eeac79a67bf131 100644 |
--- a/Source/devtools/front_end/utilities.js |
+++ b/Source/devtools/front_end/utilities.js |
@@ -1391,6 +1391,43 @@ StringMap.prototype = { |
/** |
* @constructor |
+ * @extends {StringMap.<Set.<!T>>} |
+ * @template T |
+ */ |
+var StringMultimap = function() |
+{ |
+ StringMap.call(this); |
+} |
+ |
+StringMultimap.prototype = { |
+ /** |
+ * @param {string} key |
+ * @param {T} value |
+ */ |
+ put: function(key, value) |
+ { |
+ if (key === "__proto__") { |
+ if (!this._hasProtoKey) { |
+ ++this._size; |
+ this._hasProtoKey = true; |
+ /** @type {!Set.<T>} */ |
+ this._protoValue = new Set(); |
+ } |
+ this._protoValue.add(value); |
+ return; |
+ } |
+ if (!Object.prototype.hasOwnProperty.call(this._map, key)) { |
+ ++this._size; |
+ this._map[key] = new Set(); |
+ } |
+ this._map[key].add(value); |
+ }, |
+ |
+ __proto__: StringMap.prototype |
+} |
+ |
+/** |
+ * @constructor |
*/ |
var StringSet = function() |
{ |