[Webkit-unassigned] [Bug 164096] New: [DOM] Add JSEventType

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 27 16:57:20 PDT 2016


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

            Bug ID: 164096
           Summary: [DOM] Add JSEventType
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Bindings
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: utatane.tea at gmail.com
                CC: cdumez at apple.com

I've found that Event is frequently touched in Speedometer. And I think it is frequently touched in the real Web.
But, if you touch the accessors of Event interface, you always need to perform jsDynamicCast<Event*>.
It is costly because the typical event instance is not direct instance of the Event class. For example,

MouseEvent -> UIEvent -> Event

Event resides in higher position in the hierarchy. But it has many accessors and they are used (currentTarget, type, target etc.)
So it's worth introducing JSEventType (similar to JSDocumentWrapperType) and jsEventCast.

Current my policy is, "If the jsDynamicCast<XXX>() is so frequently called and it always walks many classes, we should consider introducing some JSType.".
For example, CanvasWebGLContext thing does not require it because jsDynamicCast<....Context>() typically succeeds with the first ClassInfo.
But it is not for Event.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161027/23ca511e/attachment-0001.html>


More information about the webkit-unassigned mailing list