[Webkit-unassigned] [Bug 35941] New: [V8] Use a struct instead of an int to indicate the dom wrapper tpye

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 9 13:17:36 PST 2010


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

           Summary: [V8] Use a struct instead of an int to indicate the
                    dom wrapper tpye
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: ASSIGNED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: japhet at chromium.org
                CC: dglazkov at chromium.org, antonm at chromium.org
            Blocks: 33477


Currently, when we wrap a WebCore object for use in V8, we insert 2 internal
fields: a pointer to the WebCore object itself, and an integer indicating the
V8ClassIndex::V8WrapperType.

Instead of the integer, we could use a struct that includes pointers to the
appropriate versions of functions that WebCore might need for this object.  I
believe the callbacks would be:

* A pointer to the appropriate GetTemplate function
* A pointer to a function that derefs the WebCore object (if it is refcounted,
need in V8GCController.cpp)
* A pointer to a function that casts the WebCore object to an ActiveDOMObject
if possible (needed for appropriate handling of active objects in DOMData.cpp)

This will allow us to remove any place that we're using a macro'ed switch
statement based on the declarations in V8Index.h, as well as delete
V8Index.cpp.

Once this change is in, I plan on working toward generating an equivalent to
V8Index.h.

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