Chromium Code Reviews| 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 bf04fa8cbaa45c78f43ab8631d38dd63ff71bf88..078fe447e68d7d2eb6a116b1dbbdd4f9e92af2b9 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js |
| @@ -46,6 +46,20 @@ WebInspector.RemoteObjectPreviewFormatter = class { |
| var properties = preview.properties; |
| if (isArray) |
| properties = properties.slice().stableSort(compareIndexesFirst); |
| + else |
| + properties = properties.slice().stableSort(compareFunctionsLast); |
| + |
| + /** |
| + * @param {!RuntimeAgent.PropertyPreview} a |
| + * @param {!RuntimeAgent.PropertyPreview} b |
| + */ |
| + function compareFunctionsLast(a, b) { |
| + if (a.type !== 'function' && b.type === 'function') |
| + return -1; |
| + else if (a.type === 'function' && b.type !== 'function') |
|
lushnikov
2016/11/10 04:06:58
style: no "else"
luoe
2016/11/10 17:33:53
Done.
|
| + return 1; |
| + return 0; |
| + } |
| /** |
| * @param {!RuntimeAgent.PropertyPreview} a |