Summary: | Web Inspector: WebInspector.Object can dispatch constructor-level events multiple times | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matt Baker <mattbaker> | ||||
Component: | Web Inspector | Assignee: | Matt Baker <mattbaker> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Matt Baker
2015-10-26 16:18:56 PDT
Created attachment 264093 [details]
[Patch] Proposed Fix
Comment on attachment 264093 [details]
[Patch] Proposed Fix
Nice find!
We might be able to keep this code as-is and just remove the loop where we walk the prototype chain and just do: dispatch(this.constructor);
I think that will do the same thing, and just take advantage of JS's inheritance. I'm not sure why I didn't think of that before, unless this wasn't broken until we switched to classes with proper inheritance.
(In reply to comment #3) > Comment on attachment 264093 [details] > [Patch] Proposed Fix > > Nice find! > > We might be able to keep this code as-is and just remove the loop where we > walk the prototype chain and just do: dispatch(this.constructor); That would be a nice simplification. I'll try it out. > I think that will do the same thing, and just take advantage of JS's > inheritance. I'm not sure why I didn't think of that before, unless this > wasn't broken until we switched to classes with proper inheritance. Interesting... Comment on attachment 264093 [details]
[Patch] Proposed Fix
Nevermind! That approach wouldn't work, this is the correct fix.
My idea wont allow proper bubbling to all the classes. It would only catch event listeners registered on the concrete class of the instance, not the superclasses
Comment on attachment 264093 [details] [Patch] Proposed Fix Clearing flags on attachment: 264093 Committed r191615: <http://trac.webkit.org/changeset/191615> All reviewed patches have been landed. Closing bug. |