From 1c37edf5c2da867ff2d92100f927d641366eec16 Mon Sep 17 00:00:00 2001 From: Andreas Farre Date: Mon, 20 Jan 2020 14:58:54 +0000 Subject: [PATCH] Bug 1583863 - Part 4: Skip setting autoplay status. r=peterv Differential Revision: https://phabricator.services.mozilla.com/D57969 --HG-- extra : moz-landing-system : lando --- dom/media/GVAutoplayPermissionRequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/media/GVAutoplayPermissionRequest.cpp b/dom/media/GVAutoplayPermissionRequest.cpp index 3f76a46c66d1..3dccca8db465 100644 --- a/dom/media/GVAutoplayPermissionRequest.cpp +++ b/dom/media/GVAutoplayPermissionRequest.cpp @@ -161,7 +161,7 @@ GVAutoplayPermissionRequest::Cancel() { const RStatus status = GetRequestStatus(mContext, mType); REQUEST_LOG("Cancel, current status=%s", ToGVRequestStatusStr(status)); MOZ_ASSERT(status == RStatus::ePENDING || status == RStatus::eUNKNOWN); - if (status == RStatus::ePENDING) { + if ((status == RStatus::ePENDING) && !mContext->IsDiscarded()) { SetRequestStatus(RStatus::eDENIED); } mContext = nullptr;