Closed
Bug 1477640
Opened 6 years ago
Closed 6 years ago
AsyncEventDispatcher(dom::EventTarget* aTarget, dom::Event* aEvent) does not care dom::Event::mEvent
Categories
(Core :: DOM: Events, enhancement)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
Details
Attachments
(1 file)
AsyncEventDispatcher(dom::EventTarget* aTarget, dom::Event* aEvent) just grabs instance of aEvent as is. However, if it were created with Widget*Event allocated in stack, it'll keep referring outdated address. Fortunately, there is no such bug in current code. However, I think that we should make the constructor: * call dom::Event::DuplicatePrivateData() or * insert MOZ_ASSERT to check dom::Event::mEventIsInternal How do you think, smaug?
Flags: needinfo?(bugs)
Assignee | ||
Comment 1•6 years ago
|
||
Oops, the code is here: https://searchfox.org/mozilla-central/rev/ad36eff63e208b37bc9441b91b7cea7291d82890/dom/events/AsyncEventDispatcher.h#97-103
Comment 2•6 years ago
|
||
I think I'd prefer the assert. AsyncEventDispatcher isn't supposed to be used with stack allocated stuff.
Flags: needinfo?(bugs)
Assignee | ||
Comment 3•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b533081bc3b028ec68c2babb0a961f4e20ab64fc
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1b1d69fac25bc5a61eafc61875ca6bdfd0948943
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8994423 [details] Bug 1477640 - Make AsyncEventDispatcher(dom::EventTarget* aTarget, dom::Event* aEvent) crash in debug build if aEvent is not safe to be dispatched asynchronously https://reviewboard.mozilla.org/r/258978/#review266020
Attachment #8994423 -
Flags: review?(bugs) → review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/f2a5ae30413b Make AsyncEventDispatcher(dom::EventTarget* aTarget, dom::Event* aEvent) crash in debug build if aEvent is not safe to be dispatched asynchronously r=smaug
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f2a5ae30413b
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
Assignee: nobody → masayuki
You need to log in
before you can comment on or make changes to this bug.
Description
•