Bug 131241 - Web Inspector: Log JS Exceptions to System Console if JavaScriptCoreOutputConsoleMessagesToSystemConsole enabled
Summary: Web Inspector: Log JS Exceptions to System Console if JavaScriptCoreOutputCon...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-04-04 15:20 PDT by Joseph Pecoraro
Modified: 2014-04-04 16:55 PDT (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.02 KB, patch)
2014-04-04 15:21 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-04-04 15:20:36 PDT
We do this in WebCore when enabling the system console logging. We should do this for exceptions as well.

I did not include the backtrace of the exception, but we could add that if we want to.
Comment 1 Radar WebKit Bug Importer 2014-04-04 15:21:10 PDT
<rdar://problem/16529729>
Comment 2 Joseph Pecoraro 2014-04-04 15:21:55 PDT
Created attachment 228620 [details]
[PATCH] Proposed Fix
Comment 3 Timothy Hatcher 2014-04-04 16:24:35 PDT
Comment on attachment 228620 [details]
[PATCH] Proposed Fix

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

> Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp:162
> +            ConsoleClient::printConsoleMessage(MessageSource::JS, MessageType::Log, MessageLevel::Error, errorMessage, callFrame.sourceURL(), callFrame.lineNumber(), callFrame.columnNumber());

Would be good to print the whole stack by passing in callStack and treating it like a console.trace.
Comment 4 WebKit Commit Bot 2014-04-04 16:55:25 PDT
Comment on attachment 228620 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 228620

Committed r166816: <http://trac.webkit.org/changeset/166816>
Comment 5 WebKit Commit Bot 2014-04-04 16:55:28 PDT
All reviewed patches have been landed.  Closing bug.