diff --git a/dom/media/autoplay/AutoplayPolicy.cpp b/dom/media/autoplay/AutoplayPolicy.cpp index 8da0e60ead..90991bf1dc 100644 --- a/dom/media/autoplay/AutoplayPolicy.cpp +++ b/dom/media/autoplay/AutoplayPolicy.cpp @@ -69,18 +69,6 @@ static uint32_t SiteAutoplayPerm(nsPIDOMWindowInner* aWindow) { } static bool IsWindowAllowedToPlayByUserGesture(nsPIDOMWindowInner* aWindow) { - if (!aWindow) { - return false; - } - - WindowContext* topContext = - aWindow->GetBrowsingContext()->GetTopWindowContext(); - if (topContext && topContext->HasBeenUserGestureActivated()) { - AUTOPLAY_LOG( - "Allow autoplay as top-level context has been activated by user " - "gesture."); - return true; - } return false; }