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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js

Issue 2521513006: DevTools: allow array previews to show static array getters (Closed)
Patch Set: Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js b/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
index a3e780d336f72591d36fa8cde1676b598cad1bba..cb13a235e0756df4b55c51384acf7f547a484a27 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
@@ -47,7 +47,7 @@ Components.RemoteObjectPreviewFormatter = class {
if (isArray)
properties = properties.slice().stableSort(compareIndexesFirst);
else
- properties = properties.slice().stableSort(compareFunctionsLast);
+ properties = properties.filter(p => p.type !== 'accessor').stableSort(compareFunctionsLast);
/**
* @param {!Protocol.Runtime.PropertyPreview} a
@@ -147,6 +147,11 @@ Components.RemoteObjectPreviewFormatter = class {
var span = createElementWithClass('span', 'object-value-' + (subtype || type));
description = description || '';
+ if (type === 'accessor') {
+ span.textContent = '(...)';
dgozman 2016/11/24 00:38:49 Let's make this clickable when we can.
dgozman 2016/12/05 23:16:51 Let's just have a tooltip with explanation.
luoe 2016/12/06 01:30:44 Added as "The property is computed with a getter"
+ return span;
+ }
+
if (type === 'function') {
span.textContent = 'function';
return span;
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698