[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
Thu Jul 12 22:30:41 PDT 2012


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





--- Comment #12 from Christophe Dumez <christophe.dumez at intel.com>  2012-07-12 22:30:40 PST ---
(From update of attachment 149910)
View in context: https://bugs.webkit.org/attachment.cgi?id=149910&action=review

>>> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:35
>>> +    _Ewk_Context(WKRetainPtr<WKContextRef> contextRef)
>> 
>> Why this change?
> 
> We have to use adoptWK() here because WKContextCreate() returns leakPtr(),
> and we have to get that using WKRetainPtr in the line 35 to prevent memory leak.

It is already assigned to context which is a WKRetainPtr<WKContextRef>, so I did not think there was a leak here. Are you sure?

>>> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:65
>>> +Eina_Bool ewk_context_free(Ewk_Context* ewkContext)
>> 
>> Our *_free() functions usually don't return a boolean I believe.
> 
> Actually, there is a matter for ewk_view when we free ewk_context directly even though there is no matter for WKContext.
> Suppose that there is a ewk_view which has a reference of ewk_context,
> it will have the freed memory's reference if we free the ewk_context whenever ewk_context_free() is called.
> So, I want to check that there is a reference of ewk_context or not by using WKContext's refCount because ewk_context and WKContext have the same reference count.

So I would prefer if we had "ewk_context_ref() / ewk_context_unref()" function and if we had a reference counter in the struct, like we do already for several other Ewk types.

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