From 35f072dc2300bfcc0dfc185b96337dc0afbeb2af Mon Sep 17 00:00:00 2001 From: James Willcox Date: Mon, 5 Jun 2017 14:47:11 -0500 Subject: [PATCH] Bug 1370121 - Catch exceptions when destroying GeckoSurfaceTexture r=jchen MozReview-Commit-ID: KDoj9s0ebhY --- .../java/org/mozilla/gecko/gfx/GeckoSurfaceTexture.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git 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 index 596eca96099e..560cd0d57079 100644 --- 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 @@ -112,7 +112,12 @@ public final class GeckoSurfaceTexture extends SurfaceTexture { 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();