[Webkit-unassigned] [Bug 63381] [GTK] [WK2] Implement missing initializeLogChannel function.

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


https://bugs.webkit.org/show_bug.cgi?id=63381


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #99293|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #6 from Martin Robinson <mrobinson at webkit.org>  2011-07-11 15:52:51 PST ---
(From update of attachment 99293)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list