Closed Bug 1477881 Opened 3 years ago Closed 3 years ago
Permission Request can't double report a response
59 bytes, text/x-review-board-request
As pointed out in bug 1477273 comment 1: 1. (Gecko/C++) We cancel the permission request in the AutoplayPermissionRequest destructor , 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.  https://searchfox.org/mozilla-central/rev/ad36eff63e208b37bc9441b91b7cea7291d82890/dom/html/AutoplayPermissionRequest.cpp#37
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 email@example.com: https://hg.mozilla.org/integration/autoland/rev/f4e4541f3c1c Ensure AutoplayPermissionRequest can't double report a response. r=alwu
You need to log in before you can comment on or make changes to this bug.