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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 10 01:03:48 PDT 2012


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





--- Comment #9 from Byungwoo Lee <bw80.lee at samsung.com>  2012-09-10 01:04:06 PST ---
(In reply to comment #8)
> (From update of attachment 163001 [details])
> At first WKEinaSharedString class contains already WKEinaSharedString(WKAdoptTag, WKStringRef); so there is no need to inject friend functions 
> and private constructors, you can follow existing pattern.
This patch is come from the patch 95672 for some requirement that handles eina stringhshare data that run_javascript_prompt() callback returns.
(I think that the callback cannot return WKStringRef because it is the smart class member function)
In the application side, eina stringshare will be returned by the callback.
For preventing memory leak, adopt function for eina stringshare is needed.

> Secondly, WKAdoptTag is quite OK to use here IMHO, and it will look much more readable than just 'bool'.
Is it ok to use WKAdoptTag (adoptWK) for eina_stringshare even if it is not a WK api object?

> Thirdly, adoption is needed for the strings which have been already shared, right? So why don't you point that out? We could use 
> 'Eina_Stringshare *' type for the argument.
Thanks for pointing this. It will be more clear than const char*

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