[Webkit-unassigned] [Bug 96201] [EFL][WK2] WKEinaSharedString needs a function to adopt eina stringshare.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 9 21:06:54 PDT 2012


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





--- Comment #4 from Byungwoo Lee <bw80.lee at samsung.com>  2012-09-09 21:07:12 PST ---
(In reply to comment #2)
> (From update of attachment 163001 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=163001&action=review
> 
> > Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h:73
> > +WK_EXPORT WKEinaSharedString adoptEinaStringShare(const char* string);
> 
> Why not make it an overloaded constructor instead? WKEinaSharedString(AdoptTag, const char*) ? Seems more consistent with other adoption patterns in WebKit.


Yes, I considered using WKAdoptTag initially, but that seems to be designed to adopt data from api object type (WKXXX) that is related with APIObject and Opaque types.
(This seems to be a reason that the adopt tag name is 'AdoptWK' - adopting WK api object)

But the data that this function tries to adopt is not WK api object type, but eina stringshare which is provided by efl platform and has it's own ref, unref function - eina_stringshare_add, eina_stringshare_del)
And Wrapper class for the eina stringshare is that WKEinaSharedString.
So I decided not to use AdoptWK tag but add a function for adopt.
(I referenced the adoptRef() function, and the function also defined as a friend function of PassRefPtr)

If there is any way that I can apply the adoption pattern with AdoptTag, please share it. It will be very helpful.

Thank you :)

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