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

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

Issue 1884213003: DevTools: teach SourceMapNamesResolver to resolve "this" object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ids
Patch Set: fix tesst Created 4 years, 8 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
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 6025a3629de647c7441b557256433e69e8e5fd31..23b353d1b0dd5d821ed0f62ce1165c3a141bd7bd 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
@@ -1281,6 +1281,19 @@ Map.prototype.keysArray = function()
}
/**
+ * @return {!Multimap<!KEY, !VALUE>}
+ */
+Map.prototype.inverse = function()
+{
+ var result = new Multimap();
+ for (var key of this.keys()) {
+ var value = this.get(key);
+ result.set(value, key);
+ }
+ return result;
+}
+
+/**
* @constructor
* @template K, V
*/

Powered by Google App Engine
This is Rietveld 408576698