Bug 1367367 - handle exception caused by late error callbacks. r=esawin
authorJohn Lin <jolin@mozilla.com>
Wed, 31 May 2017 15:31:13 +0800
changeset 361959 5a37485d488d7e7d749ef49c80fd319ceab62287
parent 361958 69e9825432fd23d7e9fc7a17d7c7593dc8f1fb70
child 361960 00f292748b3e702f338589863b986f2ee50d55cf
push id31952
push usercbook@mozilla.com
push dateFri, 02 Jun 2017 12:17:25 +0000
treeherdermozilla-central@194c009d6295 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersesawin
bugs1367367
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 1367367 - handle exception caused by late error callbacks. r=esawin MozReview-Commit-ID: 1xJ5S2wpHPd
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/Codec.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/Codec.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/Codec.java
@@ -468,16 +468,18 @@ import org.mozilla.gecko.gfx.GeckoSurfac
     }
 
     private void reportError(Error error, Exception e) {
         if (e != null) {
             e.printStackTrace();
         }
         try {
             mCallbacks.onError(error == Error.FATAL);
+        } catch (NullPointerException ne) {
+            // mCallbacks has been disposed by release().
         } catch (RemoteException re) {
             re.printStackTrace();
         }
     }
 
     @Override
     public synchronized void stop() throws RemoteException {
         if (DEBUG) { Log.d(LOGTAG, "stop " + this); }