Clean cherry-pick: [aw] Fix crash when "misbehave" app exits fullscreen.

BUG:17295749

---------------------------------------------------------------------

[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

Change-Id: I297f84c42b4cb27d703c43b0e459003ea3425fc2
Cr-Commit-Position: refs/heads/master@{#292165}
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index e84b42a..a1728fe 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -660,7 +660,11 @@
      * 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