[Webkit-unassigned] [Bug 72017] [EFL] Add NULL checks after memory allocation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 11 03:54:58 PST 2011


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





--- Comment #2 from Raphael Kubo da Costa <kubo at profusion.mobi>  2011-11-11 03:54:57 PST ---
(From update of attachment 114478)
View in context: https://bugs.webkit.org/attachment.cgi?id=114478&action=review

> Source/WebCore/platform/efl/ScrollbarEfl.cpp:160
> +    Edje_Message_Float_Set* message = static_cast<Edje_Message_Float_Set*>
> +        (alloca(sizeof(Edje_Message_Float_Set) + sizeof(float)));

I'm not a big fan of alloca myself, as it is not very portable. Now that you're on this part of the code, it'd be good to replace it with new+delete or a smart pointer.

> Source/WebKit/efl/ewk/ewk_cookies.cpp:104
> +        } else
> +            CRITICAL("Could not allocate Ewk_Cookie.");

Has this happened in your daily usage? I'm asking because every once in a while patches checking for memory allocations are sent and most of the time they are rejected for the same reason (there's not much point in checking for every allocation failure across WebKit/WebCore).

> Source/WebKit/efl/ewk/ewk_window_features.cpp:126
> +    if (!window_features->core) {
> +        CRITICAL("Could not allocate WebCore::WindowFeatures.");
> +        return 0;
> +    }

Ditto.

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