WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
18785
Event dispatch should avoid malloc by using EventPromise
https://bugs.webkit.org/show_bug.cgi?id=18785
Summary
Event dispatch should avoid malloc by using EventPromise
Eric Seidel (no email)
Reported
2008-04-28 09:30:56 PDT
Event dispatch should avoid malloc by using EventPromise Darin had this idea a long while back. SVG would benefit from this, see
bug 16447
. Basically there would be an EventPromise object which was used during EventDispatch (passed "const EventPromise&" up the dispatch chain), which knew how to create an Event subclass with the right information if a listener was found, but otherwise would avoid malloc.
Attachments
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2008-04-28 09:36:12 PDT
Once version of the idea here is that the EventPromise has enough functions in it to do everything in the dispatching process except for dispatching to JavaScript. So as long as there are no JavaScript event handlers, you can just use the stack-based one. Another version, probably better, is that EventPromise simply has enough in it for simpler events; ones that are dispatched in response to engine events and that have very little data in them. For more complex events like keyboard events the EventPromise would simply wrap an already-created Event object of the appropriate subclass.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug