[Webkit-unassigned] [Bug 40807] [EFL] add support for logging

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 8 08:35:36 PDT 2010


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





--- Comment #17 from Joone Hur <joone at kldp.org>  2010-07-08 08:35:36 PST ---
(In reply to comment #16)
> (From update of attachment 60875 [details])
> > diff --git a/WebCore/platform/efl/LoggingEfl.cpp b/WebCore/platform/efl/LoggingEfl.cpp
> >  void InitializeLoggingChannelsIfNecessary()
> >  {
> > +    static bool didInitializeLoggingChannels = false;
> > +    if (didInitializeLoggingChannels)
> > +        return;
> > +
> > +    didInitializeLoggingChannels = true;
> > +
> > +    char* logEnv = getenv("WEBKIT_DEBUG");
> > +    if (!logEnv)
> > +        return;
> > +
> > +#if defined(NDEBUG)
> > +    EINA_LOG_WARN("WEBKIT_DEBUG is not empty, but this is a release build. Notice that many log messages will only appear in a debug build.");
> > +#endif
> > +
> > +    char** logv = eina_str_split(logEnv, ",", -1);
> eina_str_split might return NULL if it can not allocate space for either the new string or the array. It would crash on next line since you'd dereference a null pointer. Just add an EINA_SAFETY here.
> EINA_SAFETY_ON_NULL_RETURN(logEnv);

You mean EINA_SAFETY_ON_NULL_RETURN(logv)?

-- 
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