[Webkit-unassigned] [Bug 77835] [GObject bindings] Missing scope annotations for add/remove_event_listener

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 8 10:23:10 PST 2012


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





--- Comment #9 from C Anthony <anthony at xtfx.me>  2012-02-08 10:23:10 PST ---
the guys on #introspection (gimpnet) said the proper way to fix, without API break, is to add a _full variant to each function that accepts a GDestroyNotify param, and use a rename annotation to mask the original.  they point out g_timeout_add/g_timeout_add_full as existing examples:

< ebassi> xtfxme: webkit should have a add_full() that takes a GDestroyNotify
< ebassi> xtfxme: then you can use (scope notify)
< ebassi> xtfxme: add/remove just won't do: the language binding would not be able to release the memory of the data passed, unless it tracked the data as a refcounted blob, using something like a Set to avoid duplicates; that introduces an interesting class of issues when threads are involved
< ebassi> xtfxme: that's why G* libraries usually have an add and an add_full variants - see for instance g_timeout_add/g_timeout_add_full
< jdahlin> xtfxme: yes, adding a _full variant + Rename annotation seems like the best thing to do, doesn't break api and makes language bindings work properly

... what do you guys think?

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