Bug 1340160 - catch more local and remote Java exceptions. r=snorp a=gchang
authorJohn Lin <jolin@mozilla.com>
Mon, 06 Mar 2017 14:30:00 +0800
changeset 395056 10056139635b9355409737ccdff182427653b4ba
parent 395055 cf3c1b2f1fad6a037b193ac99244f486aaeb6f3c
child 395057 2723f822d10542d0ee7a884ed238961de1c5aaab
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, gchang
bugs1340160
milestone54.0a2
Bug 1340160 - catch more local and remote Java exceptions. r=snorp a=gchang MozReview-Commit-ID: JkfIFsKc5oe
mobile/android/base/java/org/mozilla/gecko/media/Codec.java
mobile/android/base/java/org/mozilla/gecko/media/CodecProxy.java
--- a/mobile/android/base/java/org/mozilla/gecko/media/Codec.java
+++ b/mobile/android/base/java/org/mozilla/gecko/media/Codec.java
@@ -188,18 +188,17 @@ import java.util.concurrent.ConcurrentLi
                 return;
             }
 
             Sample output = obtainOutputSample(index, info);
             try {
                 mSentIndices.add(index);
                 mSentOutputs.add(output);
                 mCallbacks.onOutput(output);
-            } catch (RemoteException e) {
-                // Dead recipient.
+            } catch (Exception e) {
                 e.printStackTrace();
                 mCodec.releaseOutputBuffer(index, false);
             }
 
             boolean eos = (info.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0;
             if (DEBUG && eos) {
                 Log.d(LOGTAG, "output EOS");
             }
--- a/mobile/android/base/java/org/mozilla/gecko/media/CodecProxy.java
+++ b/mobile/android/base/java/org/mozilla/gecko/media/CodecProxy.java
@@ -172,17 +172,17 @@ public final class CodecProxy {
         }
         try {
             Sample sample = processInput(bytes, info, cryptoInfo);
             if (sample == null) {
                 return false;
             }
             mRemote.queueInput(sample);
             sample.dispose();
-        } catch (RemoteException | IOException e) {
+        } catch (Exception e) {
             Log.e(LOGTAG, "fail to input sample: size=" + info.size +
                     ", pts=" + info.presentationTimeUs +
                     ", flags=" + Integer.toHexString(info.flags), e);
             return false;
         }
 
         return true;
     }