RESOLVED FIXED 101074
[GTK] Use a private struct and placement new syntax in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=101074
Summary [GTK] Use a private struct and placement new syntax in GObject DOM bindings
Carlos Garcia Campos
Reported 2012-11-02 11:25:16 PDT
It allows to use RefPtr for the wrapped object and it simplifies the code.
Attachments
Patch (7.82 KB, patch)
2012-11-02 11:30 PDT, Carlos Garcia Campos
no flags
Updated patch to include test results (80.55 KB, patch)
2012-11-02 12:13 PDT, Carlos Garcia Campos
xan.lopez: review+
New patch (76.57 KB, patch)
2012-12-05 09:25 PST, Carlos Garcia Campos
no flags
Carlos Garcia Campos
Comment 1 2012-11-02 11:30:40 PDT
Carlos Garcia Campos
Comment 2 2012-11-02 12:13:09 PDT
Created attachment 172103 [details] Updated patch to include test results
Xan Lopez
Comment 3 2012-12-01 02:46:19 PST
Comment on attachment 172103 [details] Updated patch to include test results Looks good to me!
Carlos Garcia Campos
Comment 4 2012-12-04 03:11:41 PST
WebKit Review Bot
Comment 5 2012-12-04 05:26:02 PST
Re-opened since this is blocked by bug 103992
Carlos Garcia Campos
Comment 6 2012-12-05 09:25:16 PST
Created attachment 177776 [details] New patch Now constructor/finalize are only implemented for classes deriving directly from Object, so the core object is added/removed to the cache only once per object.
Xan Lopez
Comment 7 2012-12-09 02:20:01 PST
Comment on attachment 177776 [details] New patch This looks good. I'd just put a comment somewhere explaining why we do the Object parent class thing, and noting that this works now because the classes we care about happen to be direct subclasses of Object. That way people changing this code in the future will have a chance to get it right ;) (Also, 'constructed' and the signal handling all seem to be garbage code from the old event listener era, we can remove that in a follow-up patch)
Carlos Garcia Campos
Comment 8 2012-12-09 07:49:52 PST
Note You need to log in before you can comment on or make changes to this bug.