Bug 149799

Summary: Web Inspector: Error displayed as an object when passed as a second argument to console.log
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Image] Bug
none
WIP
nvasilyev: commit-queue-
Patch
none
[Animated GIF] With the patch applied none

Description Nikita Vasilyev 2015-10-04 20:19:36 PDT
Created attachment 262414 [details]
[Image] Bug

try {
    bar();
} catch(error) {
    console.log(error);
    console.log("prefix", error);
}

Expected:
Both errors rendered using ErrorObjectView.

Actual:
console.log("prefix", error) shows an error as an object outline.
Comment 1 Radar WebKit Bug Importer 2015-10-04 20:19:49 PDT
<rdar://problem/22967701>
Comment 2 Nikita Vasilyev 2015-10-04 21:16:40 PDT
Created attachment 262417 [details]
WIP
Comment 3 Nikita Vasilyev 2015-10-05 07:47:18 PDT
Created attachment 262433 [details]
Patch
Comment 4 Nikita Vasilyev 2015-10-05 07:56:09 PDT
Created attachment 262434 [details]
[Animated GIF] With the patch applied
Comment 5 Joseph Pecoraro 2015-10-05 12:15:41 PDT
Comment on attachment 262433 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=262433&action=review

r=me

> Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js:506
> +        const fragment = document.createDocumentFragment();

Maybe its just me, but I think `let` is better than `const` in some of these cases.
Comment 6 WebKit Commit Bot 2015-10-05 13:00:54 PDT
Comment on attachment 262433 [details]
Patch

Clearing flags on attachment: 262433

Committed r190571: <http://trac.webkit.org/changeset/190571>
Comment 7 WebKit Commit Bot 2015-10-05 13:01:01 PDT
All reviewed patches have been landed.  Closing bug.