Bug 107157 - Make Console::shouldPrintExceptions work in WebKit2
Summary: Make Console::shouldPrintExceptions work in WebKit2
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Timothy Hatcher
Depends on:
Reported: 2013-01-17 12:19 PST by Timothy Hatcher
Modified: 2013-01-17 15:28 PST (History)
2 users (show)

See Also:

Proposed Change (15.95 KB, patch)
2013-01-17 12:26 PST, Timothy Hatcher
joepeck: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2013-01-17 12:19:59 PST
Logging console messages to stdout helps working on the Web Inspector.
Comment 1 Timothy Hatcher 2013-01-17 12:26:56 PST
Created attachment 183244 [details]
Proposed Change
Comment 2 Joseph Pecoraro 2013-01-17 12:46:15 PST
Comment on attachment 183244 [details]
Proposed Change

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

r=me with the switch to Settings.in

> Source/WebCore/page/Console.cpp:218
> +    for (unsigned i = 0; i < arguments->argumentCount(); ++i) {

NiT: You might as well update `i` to size_t here. ScriptArguments::argumentCount returns a size_t.

> Source/WebCore/page/Console.cpp:227
>          for (unsigned i = 0; i < callStack->size(); ++i) {

Ditto for ScriptCallstack::size.

> Source/WebCore/page/Settings.h:372
> +        bool m_logsPageMessagesToSystemConsoleEnabled : 1;

For simple boolean settings like this you should use probably declare it in "Source/WebCore/page/Settings.in". A single line:

    logsPageMessagesToSystemConsoleEnabled initial=false

That would also take care of initialization this in the constructor, which appears to be missing from this patch. And getters should be const.
Comment 3 Timothy Hatcher 2013-01-17 14:34:22 PST
Comment 4 Benjamin Poulain 2013-01-17 15:28:03 PST
+ http://trac.webkit.org/changeset/140060