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

Unified Diff: Source/devtools/front_end/utilities.js

Issue 143263003: DevTools: Fix console.log for arrays in some corner cases. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/devtools/front_end/ConsoleMessage.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/utilities.js
diff --git a/Source/devtools/front_end/utilities.js b/Source/devtools/front_end/utilities.js
index a416b6bf793f5026f7819ecbef31ff7976a59971..5fb73ce42fe9345fc30e427623dad7065d58f3d9 100644
--- a/Source/devtools/front_end/utilities.js
+++ b/Source/devtools/front_end/utilities.js
@@ -287,6 +287,18 @@ String.naturalOrderComparator = function(a, b)
}
/**
+ * @param {string} name
+ * @param {number=} arrayLength
+ * @return {boolean}
+ */
+String.isArrayIndexPropertyName = function(name, arrayLength)
+{
+ // Array index check according to the ES5-15.4.
+ var index = name >>> 0;
+ return String(index) === name && index !== 0xffffffff && (typeof arrayLength === "undefined" || index < arrayLength);
+}
+
+/**
* @param {number} num
* @param {number} min
* @param {number} max
« no previous file with comments | « Source/devtools/front_end/ConsoleMessage.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698