Closed
Bug 1477881
Opened 6 years ago
Closed 6 years ago
Ensure AutoplayPermissionRequest can't double report a response
Categories
(Core :: Audio/Video: Playback, enhancement, P2)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: cpearce, Assigned: cpearce)
References
Details
Attachments
(1 file)
As pointed out in bug 1477273 comment 1: 1. (Gecko/C++) We cancel the permission request in the AutoplayPermissionRequest destructor [1], and if we get a genuine cancel from the doorhanger. The Request reports the cancel to the AutoplayPermissionManager, but we reuse the same manager across different requests. So if a second request for permission comes in, we create a new AutoplayPermissionRequest and fire that off to content, but the first could be destroyed after the second is dispatched, and the cancel in the first's destructor could be reported to the manager as the second's result. We should clear the AutoplayPermissionRequest's reference to the Manager in Approve() and Cancel() so that we can't mixup the responses like this. [1] https://searchfox.org/mozilla-central/rev/ad36eff63e208b37bc9441b91b7cea7291d82890/dom/html/AutoplayPermissionRequest.cpp#37
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8994376 [details] Bug 1477881 - Ensure AutoplayPermissionRequest can't double report a response. https://reviewboard.mozilla.org/r/258946/#review266176 LGTM, thank you!
Attachment #8994376 -
Flags: review?(alwu) → review+
Pushed by cpearce@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4e4541f3c1c Ensure AutoplayPermissionRequest can't double report a response. r=alwu
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f4e4541f3c1c
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•