Summary: | Make a copy of listeners array before dispatching an event | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yury Semikhatsky <yurys> | ||||
Component: | Web Inspector (Deprecated) | Assignee: | Yury Semikhatsky <yurys> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, pmuellr, timothy | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Yury Semikhatsky
2009-09-30 05:56:19 PDT
Created attachment 40366 [details]
patch
Comment on attachment 40366 [details]
patch
Why did you remove the bind calls?
Those are needed to pass the event as the this object.
Looks like the bind() should be on preventDefault, but not on stopPropagation. Not harmful on stopPropagation, but it's not needed, and otherwise creates a new function closure for no good reason. (In reply to comment #2) > (From update of attachment 40366 [details]) > Why did you remove the bind calls? > > Those are needed to pass the event as the this object. There is no need to bind the functions to event since 'this' variable will be resolved dynamically and as long as preventDefault and stopPropagation are invoked on 'event' 'this' object will be === 'event'. Please tell me if you still want me to revert the changes. Comment on attachment 40366 [details] patch Clearing flags on attachment: 40366 Committed r48970: <http://trac.webkit.org/changeset/48970> All reviewed patches have been landed. Closing bug. |