Bug 1268122 - Guard against layerview destruction between the compositor update task being posted and it running. r=snorp
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 28 Apr 2016 15:03:02 -0400
changeset 357683 69f4cf1125c2137512d2de6594769d21b469a02d
parent 357682 50abf674bd97ca7a8db73aee54ce1f6f6148bbd0
child 357684 79ff551092cfd0adec598650f8e80988d9f51535
push id16816
push userbmo:gasolin@mozilla.com
push dateFri, 29 Apr 2016 03:33:20 +0000
reviewerssnorp
bugs1268122
milestone49.0a1
Bug 1268122 - Guard against layerview destruction between the compositor update task being posted and it running. r=snorp MozReview-Commit-ID: HJIFbcduj6E
mobile/android/base/java/org/mozilla/gecko/gfx/GLController.java
--- a/mobile/android/base/java/org/mozilla/gecko/gfx/GLController.java
+++ b/mobile/android/base/java/org/mozilla/gecko/gfx/GLController.java
@@ -137,16 +137,20 @@ public class GLController extends JNIObj
                 updateCompositor();
             }
         });
     }
 
     void updateCompositor() {
         ThreadUtils.assertOnUiThread();
 
+        if (mView == null) {
+            return;
+        }
+
         if (mCompositorCreated) {
             // If the compositor has already been created, just resume it instead. We don't need
             // to block here because if the surface is destroyed before the compositor grabs it,
             // we can handle that gracefully (i.e. the compositor will remain paused).
             resumeCompositor(mWidth, mHeight);
             return;
         }