[Webkit-unassigned] [Bug 16401] [GTK] GObject/C DOM binding
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 17 17:15:01 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=16401
------- Comment #92 from lkcl at lkcl.net 2008-10-17 17:15 PDT -------
> I don't think the generated bindings code should be calling ref() or deref()
> explicitly at all. Managing the lifetimes of the wrapped objects via a RefPtr
> is almost certainly sufficient.
then why did the code crash, without them (without the ref and deref), and why
are the ObjC bindings using the ref and deref technique, which i am copying,
verbatim?
btw i've taken a quick look at the GDOMBindings.cpp, i believe i may have
spotted an error, in the toGDOM(Element*) implementation. comparing each call
of ref(), there are a couple that are inconsistent: one calls doc->ref() which
i don't think it should.
... but... i copied this technique from JSBindings and ObjC bindings - why
should these bindings be different?
> There is some documentation at <http://webkit.org/coding/RefPtr.html> on how to
> use RefPtr and PassRefPtr to efficiently handle our reference counted objects.
thank you. although i remember, clearly, your very helpful explanations
on IRC some weeks back, i'll read it over the next day or two to ensure i
haven't missed anything.
.... well ... y'know... it's been long enough so i honestly can't say.
it's probably worthwhile someone taking out the ref()s in GDOMBindings.cpp,
commenting out that deref auto-generator line in GObject.pm, and testing a
pyjamas-desktop app with pywebkitgtk. (which may prove to be a shorter way to
do a test than to write some c code, although a "hello world" direct use of the
glib functions _would_ be really useful, and cool to see).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list