[webkit-reviews] review denied: [Bug 63381] [GTK] [WK2] Implement missing initializeLogChannel function. : [Attachment 99293] Logging WK2 GTK

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 11 15:52:50 PDT 2011


Martin Robinson <mrobinson at webkit.org> has denied Lukasz Slachciak
<l.slachciak at samsung.com>'s request for review:
Bug 63381: [GTK] [WK2] Implement missing initializeLogChannel function.
https://bugs.webkit.org/show_bug.cgi?id=63381

Attachment 99293: Logging WK2 GTK
https://bugs.webkit.org/attachment.cgi?id=99293&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=99293&action=review

Looks pretty good, but I have a few nits.

> Source/WebKit2/Platform/gtk/LoggingGtk.cpp:39
> +    const static String logEnv(g_getenv("WEBKIT_DEBUG"));
> +    static Vector<String> logv;

Please don't use abbreviations for variable names. I suggest something like
activatedChannels here, instead of logv.

> Source/WebKit2/Platform/gtk/LoggingGtk.cpp:52
> +    if (logv.isEmpty())
> +	   logEnv.split(" ", logv);
> +
> +    for (unsigned int i = 0; i < logv.size(); i++) {
> +	   if (channel == getChannelFromName(logv[i])) {
> +	       channel->state = WTFLogChannelOn;
> +	       break;
> +	   }
> +    }

Instead of iterating and parsing log channel names for every single channel,
why not build a Vector of WTFLogChannel once and then simply do
activatedChannels.contains each time? This would take up less space and be
faster, I believe.


More information about the webkit-reviews mailing list