Bug 101074

Summary: [GTK] Use a private struct and placement new syntax in GObject DOM bindings
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric.carlson, feature-media-reviews, haraken, japhet, webkit.review.bot, xan.lopez, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 101072, 103992    
Bug Blocks: 101077, 101079    
Attachments:
Description Flags
Patch
none
Updated patch to include test results
xan.lopez: review+
New patch none

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>