Commit b2cea423 authored by Mounir Lamouri's avatar Mounir Lamouri Committed by Commit Bot

Reset picture_in_picture_allowed_in_fullscreen_ when fullscreen_player_ is reset.

This is an opportunistic fix for a crash that we were not able to
reproduce locally.

Bug: 833360
Change-Id: If376405dd75591bcbbb47273e2330027de8ebd0d
Reviewed-on: https://chromium-review.googlesource.com/1028359Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553680}
parent 55741866
...@@ -69,10 +69,10 @@ void MediaWebContentsObserver::RenderFrameDeleted( ...@@ -69,10 +69,10 @@ void MediaWebContentsObserver::RenderFrameDeleted(
ClearWakeLocks(render_frame_host); ClearWakeLocks(render_frame_host);
session_controllers_manager_.RenderFrameDeleted(render_frame_host); session_controllers_manager_.RenderFrameDeleted(render_frame_host);
if (fullscreen_player_ && fullscreen_player_->first == render_frame_host) if (fullscreen_player_ && fullscreen_player_->first == render_frame_host) {
fullscreen_player_.reset();
picture_in_picture_allowed_in_fullscreen_.reset(); picture_in_picture_allowed_in_fullscreen_.reset();
fullscreen_player_.reset();
}
} }
void MediaWebContentsObserver::MaybeUpdateAudibleState() { void MediaWebContentsObserver::MaybeUpdateAudibleState() {
...@@ -274,10 +274,10 @@ void MediaWebContentsObserver::OnMediaEffectivelyFullscreenChanged( ...@@ -274,10 +274,10 @@ void MediaWebContentsObserver::OnMediaEffectivelyFullscreenChanged(
picture_in_picture_allowed_in_fullscreen_ = false; picture_in_picture_allowed_in_fullscreen_ = false;
break; break;
case blink::WebFullscreenVideoStatus::kNotEffectivelyFullscreen: case blink::WebFullscreenVideoStatus::kNotEffectivelyFullscreen:
picture_in_picture_allowed_in_fullscreen_.reset();
if (!fullscreen_player_ || *fullscreen_player_ != id) if (!fullscreen_player_ || *fullscreen_player_ != id)
return; return;
picture_in_picture_allowed_in_fullscreen_.reset();
fullscreen_player_.reset(); fullscreen_player_.reset();
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment