Bug 101074 - [GTK] Use a private struct and placement new syntax in GObject DOM bindings
Summary: [GTK] Use a private struct and placement new syntax in GObject DOM bindings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 101072 103992
Blocks: 101077 101079
  Show dependency treegraph
 
Reported: 2012-11-02 11:25 PDT by Carlos Garcia Campos
Modified: 2012-12-09 07:50 PST (History)
8 users (show)

See Also:


Attachments
Patch (7.82 KB, patch)
2012-11-02 11:30 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Updated patch to include test results (80.55 KB, patch)
2012-11-02 12:13 PDT, Carlos Garcia Campos
xan.lopez: review+
Details | Formatted Diff | Diff
New patch (76.57 KB, patch)
2012-12-05 09:25 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-11-02 11:25:16 PDT
It allows to use RefPtr for the wrapped object and it simplifies the code.
Comment 1 Carlos Garcia Campos 2012-11-02 11:30:40 PDT
Created attachment 172093 [details]
Patch
Comment 2 Carlos Garcia Campos 2012-11-02 12:13:09 PDT
Created attachment 172103 [details]
Updated patch to include test results
Comment 3 Xan Lopez 2012-12-01 02:46:19 PST
Comment on attachment 172103 [details]
Updated patch to include test results

Looks good to me!
Comment 4 Carlos Garcia Campos 2012-12-04 03:11:41 PST
Committed r136498: <http://trac.webkit.org/changeset/136498>
Comment 5 WebKit Review Bot 2012-12-04 05:26:02 PST
Re-opened since this is blocked by bug 103992
Comment 6 Carlos Garcia Campos 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.
Comment 7 Xan Lopez 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)
Comment 8 Carlos Garcia Campos 2012-12-09 07:49:52 PST
Comment on attachment 177776 [details]
New patch

Committed r137072: <http://trac.webkit.org/changeset/137072>