[Webkit-unassigned] [Bug 89186] [EFL][WK2] Add APIs to create, delete and get ewk_context.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 13 00:19:22 PDT 2012


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





--- Comment #16 from Christophe Dumez <christophe.dumez at intel.com>  2012-07-13 00:19:21 PST ---
(From update of attachment 152166)
View in context: https://bugs.webkit.org/attachment.cgi?id=152166&action=review

> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:41
> +        : __ref(0)

__ref should be initialized to 1

> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:61
> +    ewkContext->__ref--;

You never call delete. Should look like:
    if (--ewkContext->__ref)
        return;

    delete ewkContext;

> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:68
> +    ewkContext->__ref++;

Please use pre-incrementation.

> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:75
> +    ewk_context_ref(ewkContext);

Should not be called after a new. Not needed if __ref is initialized to 1.

> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:100
> +Eina_Bool ewk_context_free(Ewk_Context* ewkContext)

There should be no _free() function since we have ref() / unref() now.

> Source/WebKit2/UIProcess/API/efl/ewk_context_private.h:28
> +void ewk_context_unref(Ewk_Context*);

I believe ref() / unref() should be public.

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