| 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..dc6e0ace04f86ec7f7cb7ecb7d743b31d1823f6b 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;
|
| + if (a.type === 'function' && b.type !== 'function')
|
| + return 1;
|
| + return 0;
|
| + }
|
|
|
| /**
|
| * @param {!RuntimeAgent.PropertyPreview} a
|
|
|