[Webkit-unassigned] [Bug 95672] [EFL][WK2] Add javascript popup api.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 9 04:14:25 PDT 2012


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





--- Comment #21 from Christophe Dumez <christophe.dumez at intel.com>  2012-09-09 04:14:42 PST ---
(From update of attachment 162985)
View in context: https://bugs.webkit.org/attachment.cgi?id=162985&action=review

>>>> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:1579
>>>> +    eina_stringshare_del(value);
>>> 
>>> Is this right to call eina_stringshare_del(value) here? It seems to return NULL always.
>> 
>> Yes, indeed. Nice catch :)
> 
> I think this should be called.
> In the callback function, application created eina stringshare and returns it.
> So the ref count of the returned stringshare will be 1.
> After assigning the returned stringshare to WKEinaSharedString value,
> the ref count will be increased so the ref count will be 2.
> Without eina_stringshare_del(value), the returned stringshare cannot be deleted, because, destructor of value only decrease one time.
> So I called this.
> 
> And I'm planning to create some mechanism like adoptPtr and passRefPtr for WKEinaStringShare because of this.
> 
> Is there something that I misunderstand about this?

I understand your point, thanks for the explanation. But then, I would add a mechanism to WKEinaSharedString to adopt the string and use it instead. Using WKEinaSharedString and explicitly altering its ref count using eina_stringshare_del feels wrong.
I suggest you add the WKEinaSharedString string adoption in this patch instead.

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