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

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

Issue 2869293002: DevTools: make CompilerScriptMapping / SASSSourceMapping manage UISourceCodes (Closed)
Patch Set: address comments Created 3 years, 7 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 14f5d3aa303744586a5d7480c62cf783f7b71390..07435b1c845d6c4fd294ede18c878b966ee2b2a2 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
@@ -1091,6 +1091,16 @@ Set.prototype.valuesArray = function() {
return Array.from(this.values());
};
+/**
+ * @return {?T}
+ * @template T
+ */
+Set.prototype.firstValue = function() {
+ if (!this.size)
+ return null;
+ return this.values().next().value;
+};
+
/**
* @param {!Iterable<T>|!Array<!T>} iterable
* @template T

Powered by Google App Engine
This is Rietveld 408576698