Chromium Code Reviews

Unified Diff: src/inspector/injected-script-source.js

Issue 2521853003: Re-land of Use parenthesis in descriptions for array/map/set lengths/sizes (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | test/inspector/debugger/object-preview-internal-properties-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/injected-script-source.js
diff --git a/src/inspector/injected-script-source.js b/src/inspector/injected-script-source.js
index 39c6c9c1e84b0d461a415ab5f9a6d6ec2588f1a2..bfa8a97e46e6e1314cc1ac0a46b54d7c8087e828 100644
--- a/src/inspector/injected-script-source.js
+++ b/src/inspector/injected-script-source.js
@@ -629,7 +629,13 @@ InjectedScript.prototype = {
var className = InjectedScriptHost.internalConstructorName(obj);
if (subtype === "array" || subtype === "typedarray") {
if (typeof obj.length === "number")
- className += "[" + obj.length + "]";
+ className += "(" + obj.length + ")";
kozy 2016/11/23 01:04:39 className += "(" + obj.length + ")"; -> return cla
luoe 2016/11/23 18:36:25 Done.
+ return className;
+ }
+
+ if (subtype === "map" || subtype === "set") {
+ if (typeof obj.size === "number")
+ className += "(" + obj.size + ")";
kozy 2016/11/23 01:04:39 ditto
luoe 2016/11/23 18:36:25 Done.
return className;
}
« no previous file with comments | « no previous file | test/inspector/debugger/object-preview-internal-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine