Bug 110968

Summary: Introduce new message sources for logging.
Product: WebKit Reporter: Dmitry Zvorygin <zvorygin>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, mkwst, pfeldman, rniwa, timothy, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Dmitry Zvorygin 2013-02-27 04:04:01 PST
Introduce new message source for logging, and alter some message sources for existing log records, to make logging more fine-tuneable, and self-descriptive.
Comment 1 Dmitry Zvorygin 2013-02-27 04:12:41 PST
Created attachment 190488 [details]
Patch
Comment 2 Pavel Feldman 2013-02-27 04:17:40 PST
Mike, how do you like it?
Comment 3 Build Bot 2013-02-27 05:03:01 PST
Comment on attachment 190488 [details]
Patch

Attachment 190488 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/16769785
Comment 4 Mike West 2013-02-27 05:29:12 PST
Comment on attachment 190488 [details]
Patch

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

This is a great start, thank you! I like the direction... a few comments inline.

> Source/WebCore/Modules/webdatabase/DatabaseBase.cpp:49
> +    m_scriptExecutionContext->addConsoleMessage(OfflineMessageSource, ErrorMessageLevel, message);

Why "Offline" here? I'd suggest something like "Storage", which would also allow us to change IDB messages.

> Source/WebCore/html/HTMLFormElement.cpp:264
> +            document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);

Let's leave this as RenderingMessageSource, and probably change the message in a separate patch, as it's confusing.  This error occurs when form validation would focus on a required element that, for whatever reason, isn't focusable. LayoutTests/fast/forms/interactive-validation-prevented.html has an example.

> Source/WebCore/html/HTMLIFrameElement.cpp:93
> +            document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidTokens);

This seems more like a rendering/parsing error than a security error. The sandbox isn't blocking anything, it's not being parsed correctly.

> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:5314
> +    document->addConsoleMessage(RenderingMessageSource, WarningMessageLevel, message);

It might make sense to give WebGL errors a source of their own, if we're going to be enabling filtering on them later.

> Source/WebCore/loader/MixedContentChecker.cpp:102
>      // FIXME: Why does this message not have a source URL or a line number? webkit.org/b/97979

Since you're here, please kill this FIXME. We fixed it when adding stack traces to messages globally.

> Source/WebCore/svg/SVGDocumentExtensions.cpp:138
> +        document->addConsoleMessage(RenderingMessageSource, level, message);

SVG might be another reason (alongside WebGL from above) to add a GraphicsMessageSource or something similar.
Comment 5 Build Bot 2013-02-27 05:33:51 PST
Comment on attachment 190488 [details]
Patch

Attachment 190488 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/16823159
Comment 6 Build Bot 2013-02-27 06:33:15 PST
Comment on attachment 190488 [details]
Patch

Attachment 190488 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/16672367
Comment 7 Pavel Feldman 2013-02-28 04:19:06 PST
Comment on attachment 190488 [details]
Patch

r- as per Mike's comments.
Comment 8 Dmitry Zvorygin 2013-03-05 08:14:01 PST
Comment on attachment 190488 [details]
Patch

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

>> Source/WebCore/Modules/webdatabase/DatabaseBase.cpp:49
>> +    m_scriptExecutionContext->addConsoleMessage(OfflineMessageSource, ErrorMessageLevel, message);
> 
> Why "Offline" here? I'd suggest something like "Storage", which would also allow us to change IDB messages.

Done.

>> Source/WebCore/html/HTMLFormElement.cpp:264
>> +            document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);
> 
> Let's leave this as RenderingMessageSource, and probably change the message in a separate patch, as it's confusing.  This error occurs when form validation would focus on a required element that, for whatever reason, isn't focusable. LayoutTests/fast/forms/interactive-validation-prevented.html has an example.

Ok.

>> Source/WebCore/html/HTMLIFrameElement.cpp:93
>> +            document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidTokens);
> 
> This seems more like a rendering/parsing error than a security error. The sandbox isn't blocking anything, it's not being parsed correctly.

Ok.

>> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:5314
>> +    document->addConsoleMessage(RenderingMessageSource, WarningMessageLevel, message);
> 
> It might make sense to give WebGL errors a source of their own, if we're going to be enabling filtering on them later.

Currently we aren't going to have separate webgl filter.

>> Source/WebCore/loader/MixedContentChecker.cpp:102
>>      // FIXME: Why does this message not have a source URL or a line number? webkit.org/b/97979
> 
> Since you're here, please kill this FIXME. We fixed it when adding stack traces to messages globally.

Done.

>> Source/WebCore/svg/SVGDocumentExtensions.cpp:138
>> +        document->addConsoleMessage(RenderingMessageSource, level, message);
> 
> SVG might be another reason (alongside WebGL from above) to add a GraphicsMessageSource or something similar.

Maybe later, if somebody provides well reviewed list of required message sources.
Comment 9 Dmitry Zvorygin 2013-03-05 08:15:55 PST
Created attachment 191500 [details]
Patch
Comment 10 Pavel Feldman 2013-03-05 08:43:15 PST
Comment on attachment 191500 [details]
Patch

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

> Source/WebCore/page/Console.cpp:104
> +        sourceString = "OFFLINE";

Copy paste.
Comment 11 Dmitry Zvorygin 2013-03-05 08:45:55 PST
Created attachment 191503 [details]
Patch
Comment 12 WebKit Review Bot 2013-03-05 10:17:59 PST
Comment on attachment 191503 [details]
Patch

Rejecting attachment 191503 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 191503, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:
t/git/webkit-commit-queue/Source/WebKit/chromium/v8 --revision 13779 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
54>At revision 13779.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://webkit-commit-queue.appspot.com/results/17017009
Comment 13 Build Bot 2013-03-05 12:04:54 PST
Comment on attachment 191503 [details]
Patch

Attachment 191503 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/17060012
Comment 14 Build Bot 2013-03-06 01:08:43 PST
Comment on attachment 191503 [details]
Patch

Attachment 191503 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/16991216
Comment 15 Build Bot 2013-03-06 01:28:27 PST
Comment on attachment 191503 [details]
Patch

Attachment 191503 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/16998112
Comment 16 Build Bot 2013-03-06 02:53:23 PST
Comment on attachment 191503 [details]
Patch

Attachment 191503 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17036140
Comment 17 Dmitry Zvorygin 2013-03-06 03:50:44 PST
Created attachment 191708 [details]
Patch
Comment 18 WebKit Review Bot 2013-03-06 09:59:28 PST
Comment on attachment 191708 [details]
Patch

Rejecting attachment 191708 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-04', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 191708, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:
t/git/webkit-commit-queue/Source/WebKit/chromium/v8 --revision 13779 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
54>At revision 13779.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://webkit-commit-queue.appspot.com/results/17079161
Comment 19 Dmitry Zvorygin 2013-03-06 10:11:02 PST
Created attachment 191782 [details]
Patch
Comment 20 WebKit Review Bot 2013-03-06 10:57:56 PST
Comment on attachment 191782 [details]
Patch

Clearing flags on attachment: 191782

Committed r144949: <http://trac.webkit.org/changeset/144949>
Comment 21 WebKit Review Bot 2013-03-06 10:58:00 PST
All reviewed patches have been landed.  Closing bug.