Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Unified Diff: media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java

Issue 74293002: Fix browser crash when calling MediaPlayerBridge::PrepareAsync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing scherkus's comments Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/android/media_player_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
diff --git a/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java b/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
index ecf445853e8d2cb920ffd90dda6ff3e449310482..fe9407d94c522a97e2cc80aaecf2c7cc90d56424 100644
--- a/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
@@ -50,8 +50,14 @@ public class MediaPlayerBridge {
}
@CalledByNative
- protected void prepareAsync() throws IllegalStateException {
- getLocalPlayer().prepareAsync();
+ protected boolean prepareAsync() {
+ try {
+ getLocalPlayer().prepareAsync();
+ } catch (IllegalStateException e) {
+ Log.e(TAG, "Unable to prepare MediaPlayer.", e);
+ return false;
+ }
+ return true;
}
@CalledByNative
« no previous file with comments | « no previous file | media/base/android/media_player_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698