Bug 1268122 - Guard against layerview destruction between the compositor update task being posted and it running. r?snorp draft
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 28 Apr 2016 15:03:02 -0400
changeset 357434 8727b4d370e577a0eb7f55ffa0898d9f5d665a9d
parent 357432 6adc822f5e27a55551faeb6c47a9bd8b0859a23b
child 519646 7186ab2473e8e69ab3526424890f3ef46cf6cbb3
push id16783
push userkgupta@mozilla.com
push dateThu, 28 Apr 2016 19:03:15 +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;
         }