Bug 1370121 - Catch exceptions when destroying GeckoSurfaceTexture r=jchen
authorJames Willcox <snorp@snorp.net>
Mon, 05 Jun 2017 14:47:11 -0500
changeset 410814 f6c60e5255fc56a55f33dd05eddb14357c5538ed
parent 410813 514cd61f92a0970ba495ffe39f0252b50bd8d4ea
child 410815 6fa514595f1b4d4f6b6827fbc1bc88975b5e5250
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1370121
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370121 - Catch exceptions when destroying GeckoSurfaceTexture r=jchen MozReview-Commit-ID: KDoj9s0ebhY
mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoSurfaceTexture.java
--- 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
@@ -107,17 +107,22 @@ public final class GeckoSurfaceTexture e
         if (useCount == 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()) {