Step-by-step: 1. Open dev-tools -> console 2. input "({})" 3. hit "enter" Output: Expandable Object Expected: Console prints "Object {}" - a short preview of the project in the way it does for other non-empty objects
Created attachment 172813 [details] Patch
Comment on attachment 172813 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=172813&action=review > Source/WebCore/inspector/InjectedScriptSource.js:826 > + this._generateProtoPreview(o, properties, elementsToDump); Isn't properties redundant? > Source/WebCore/inspector/InjectedScriptSource.js:834 > + _generateProtoPreview: function(object, properties, elementsToDump) properties === this.preview.properties, why is it needed? > Source/WebCore/inspector/InjectedScriptSource.js:880 > + description = this._abbreviateString(/** @type {string} */ (injectedScript._describe(value)), maxLength, subtype === "regexp"); extra space before = > Source/WebCore/inspector/front-end/ConsoleMessage.js:333 > + span.textContent = "function"; Please remove braces. Or you could just replace else branches with span.textContent = property.type === "function" ? "function" : property.value;
Committed r134053: <http://trac.webkit.org/changeset/134053>