Commit c0e9f011 authored by igsolla's avatar igsolla Committed by Commit bot

[aw] Fix crash when "misbehave" app exits fullscreen.

exitFullScreen() might be call without a prior call to
enterFullScreen() if a "misbehave" app overrides onShowCustomView
but does not add the custom view to the window. This fixes a
crash by returning early from exitFullScreen in that case.

BUG=408133

Review URL: https://codereview.chromium.org/501093007

Cr-Commit-Position: refs/heads/master@{#292165}
parent 65f3c815
......@@ -663,7 +663,11 @@ public class AwContents {
* in the WebView.
*/
void exitFullScreen() {
assert isFullScreen();
if (!isFullScreen())
// exitFullScreen() can be called without a prior call to enterFullScreen() if a
// "misbehave" app overrides onShowCustomView but does not add the custom view to
// the window. Exiting avoids a crash.
return;
// Detach to tear down the GL functor if this is still associated with the old
// container view. It will be recreated during the next call to onDraw attached to
......
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