Bug 1607883 - Allow GeckoView autoplay permission prompt in non-e10s. r=alwu

Prior to this patch we prevented permission requests firing if the code was
executed in a parent process. This makes sense for e10s, as only content
processes should do so. However, if we're in non-e10s mode then the single
process we run the code in is considered a parent process for the purpose of our
check and we don't fire the request.

This patch changes the check to not send the request if we're specifically in an
e10s parent process.

Differential Revision: https://phabricator.services.mozilla.com/D59404

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bryce Seager van Dyk 2020-01-10 13:14:23 +00:00
parent 0f4b542755
commit 963bdd1440

View File

@ -194,8 +194,8 @@ void GVAutoplayPermissionRequestor::AskForPermissionIfNeeded(
} }
// The request is used for content permission, so it's no need to create a // The request is used for content permission, so it's no need to create a
// content request in parent process. // content request in parent process if we're in e10s.
if (XRE_IsParentProcess()) { if (XRE_IsE10sParentProcess()) {
return; return;
} }