Bug 1370121 - Catch exceptions when destroying GeckoSurfaceTexture r=jchen
MozReview-Commit-ID: KDoj9s0ebhY
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoSurfaceTexture.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoSurfaceTexture.java
@@ -102,17 +102,22 @@ public final class GeckoSurfaceTexture e
if (mUseCount == 0) {
synchronized (sSurfaceTextures) {
sSurfaceTextures.remove(mHandle);
}
setListener(null);
if (Versions.feature16Plus) {
- detachFromGLContext();
+ try {
+ detachFromGLContext();
+ } catch (Exception e) {
+ // This can throw if the EGL context is not current
+ // but we can't do anything about that now.
+ }
}
release();
}
}
public static GeckoSurfaceTexture acquire(boolean singleBufferMode) {
if (singleBufferMode && !isSingleBufferSupported()) {