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

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

Issue 2563883002: DevTools: sort non-enumerable and underscore properties lower in logged object (Closed)
Patch Set: rebase again Created 4 years 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-object-preview-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/ObjectPropertiesSection.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js b/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
index 910d6a8f1a3857aaf51a5a2c3de0f37ea3ede830..830e921d27f1532cc7c3da6b40c43d7f34ad9e2a 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
@@ -101,6 +101,14 @@ Components.ObjectPropertiesSection = class extends TreeOutlineInShadow {
return 1;
if (b === '__proto__')
return -1;
+ if (!propertyA.enumerable && propertyB.enumerable)
+ return 1;
+ if (!propertyB.enumerable && propertyA.enumerable)
+ return -1;
+ if (a.startsWith('_') && !b.startsWith('_'))
+ return 1;
+ if (b.startsWith('_') && !a.startsWith('_'))
+ return -1;
if (propertyA.symbol && !propertyB.symbol)
return 1;
if (propertyB.symbol && !propertyA.symbol)
@@ -341,7 +349,8 @@ Components.ObjectPropertiesSection = class extends TreeOutlineInShadow {
var defaultName = includePreview ? '' : 'anonymous';
if (response && response.functionName)
defaultName = response.functionName;
- var valueElement = Components.ObjectPropertiesSection.valueElementForFunctionDescription(func.description, includePreview, defaultName);
+ var valueElement = Components.ObjectPropertiesSection.valueElementForFunctionDescription(
+ func.description, includePreview, defaultName);
element.appendChild(valueElement);
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/console/console-object-preview-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698