WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
101356
Web Inspector: wrong output for empty object {}
https://bugs.webkit.org/show_bug.cgi?id=101356
Summary
Web Inspector: wrong output for empty object {}
Andrey Lushnikov
Reported
2012-11-06 08:18:24 PST
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
Attachments
Patch
(16.81 KB, patch)
2012-11-07 08:28 PST
,
Pavel Feldman
vsevik
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2012-11-07 08:28:36 PST
Created
attachment 172813
[details]
Patch
Vsevolod Vlasov
Comment 2
2012-11-07 08:57:20 PST
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;
Pavel Feldman
Comment 3
2012-11-09 05:05:48 PST
Committed
r134053
: <
http://trac.webkit.org/changeset/134053
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug