summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Mineer <amineer@chromium.org>2016-01-25 10:09:46 -0800
committerAlex Mineer <amineer@chromium.org>2016-01-25 18:12:03 +0000
commit5e0f435f3e505395a3529c1834bdabe687cd0f7f (patch)
tree7e037ed425dfd4e36192d752d389c7475a292a91
parentbbbb68aafca9b3f5b2a1e60ad68667da4e044d9b (diff)
downloadchromium_src-5e0f435f3e505395a3529c1834bdabe687cd0f7f.zip
chromium_src-5e0f435f3e505395a3529c1834bdabe687cd0f7f.tar.gz
chromium_src-5e0f435f3e505395a3529c1834bdabe687cd0f7f.tar.bz2
Catch runtime exception when creating MediaThrottler
MediaPlayer.create() can throw Runtime exception. Catch the exception to prevent app crash. BUG=579702 Review URL: https://codereview.chromium.org/1611193004 (cherry picked from commit c4a11e8be4fd16ec51ee3a5efcc22e57043b3475) Cr-Original-Commit-Position: refs/heads/master@{#370783} Cr-Commit-Position: refs/branch-heads/2564@{#621} Cr-Branched-From: 1283eca15bd9f772387f75241576cde7bdec7f54-refs/heads/master@{#359700}
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java b/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java
index 9992704..ece07e1 100644
--- a/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java
+++ b/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java
@@ -107,6 +107,8 @@ class MediaThrottler implements MediaPlayer.OnErrorListener {
mPlayer = MediaPlayer.create(mContext, R.raw.empty);
} catch (IllegalStateException e) {
Log.e(TAG, "Exception happens while creating the watch dog player.", e);
+ } catch (RuntimeException e) {
+ Log.e(TAG, "Exception happens while creating the watch dog player.", e);
}
if (mPlayer == null) {
Log.e(TAG, "Unable to create watch dog player, treat it as server crash.");