Closed Bug 1374921 Opened 7 years ago Closed 7 years ago

DOM Event handlers should not use QI from nsIDOMEvent

Categories

(Core :: DOM: Events, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: masayuki, Assigned: bzbarsky)

References

Details

Although this does not affect any benchmarks because of event handlers' performance issue, I guess that this may affect quickness of user operation. https://searchfox.org/mozilla-central/search?q=nsIDOM.*Event%3E.*%5Cn%3F.*do_QueryInterface&case=false&regexp=true&path= I think that if all of them can use Widget*Event instead, they should use it. Otherwise, I think that mozilla::dom::*Event classes should have |As*Event()| virtual methods like Widget*Event.
Probably yes, though need to be careful with this. What if we want to handle also events named foo when those aren't dispatched using WidgetFooEvent, but generic WidgetEvent. In that case event's message would be the generic one.
Priority: -- → P2
Depends on: 1455055
I believe the patches landed for bug 1455055 pretty much fix this. Masayuki-san, do you agree?
Flags: needinfo?(masayuki)
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #2) > I believe the patches landed for bug 1455055 pretty much fix this. > Masayuki-san, do you agree? Yes, I do! Really thank you for your work!!
Assignee: nobody → bzbarsky
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(masayuki)
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.