Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2270)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 501093007: [aw] Fix crash when "misbehave" app exits fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
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 f33ab48beccb01e0eadcdf23da167851415ba37f..6ad74c86b4bb892651b894f3d6074b21be1a57ba 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698