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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 9 04:23:49 PDT 2012


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





--- Comment #23 from Christophe Dumez <christophe.dumez at intel.com>  2012-09-09 04:24:06 PST ---
(In reply to comment #22)
> (In reply to comment #21)
> > (From update of attachment 162985 [details] [details])
> > 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.
> 
> Sure~ I'll make the patch first. Thanks :)

IMO, you could have added it in the same patch since it is very little code (just an addition adopt() static method to WKEinaSharedString class, right?).

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