|
|
Created:
6 years, 6 months ago by benm (inactive) Modified:
6 years, 6 months ago CC:
chromium-reviews, feature-media-reviews_chromium.org, avayvod+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
Description[Android] Use exceptions rather that Log.wtf on Android
AudioManagerAndroid uses Log.wtf to signal error conditions. However,
the undefined behavior of this function depending on device
configuration makes debugging difficult. Throw exceptions instead.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278807
Patch Set 1 #
Total comments: 4
Patch Set 2 : nit #Messages
Total messages: 22 (0 generated)
Hey Henrik, I noticed the use of Log.wtf in AudioManagerAndroid while we were looking at the WebRTC permission crash, it doesn't seem quite right to me and made debugging the permission crash quite hard. I don't think there should be any functional difference with this change to excetions, other than we'll get a stack trace in the logcat. WDYT?
Looks great. I will check details tomorrow. What exactly happens now when you do the "throw new ...." dance? Gives a clear output in logcat?
Right, it will crash the app (as nothing will catch the exception) and output the stack trace to logcat. Log.wtf would crash the app, but hide the stack trace in the event dropbox (which is why it was hard to debug, I forgot to look there). On 18 June 2014 18:56, <henrika@chromium.org> wrote: > Looks great. I will check details tomorrow. > > What exactly happens now when you do the "throw new ...." dance? Gives a > clear > output in logcat? > > > https://codereview.chromium.org/340083002/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Thx. Do you need OK now or can I check tomorrow?
Tomorrow is fine! Thanks! Sent from my Android On 18 Jun 2014 19:02, <henrika@chromium.org> wrote: > Thx. Do you need OK now or can I check tomorrow? > > https://codereview.chromium.org/340083002/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
LGTM with question.
https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... File media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java (right): https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java:657: BluetoothManager btManager = Why do you remove try-catch here?
https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... File media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java (right): https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java:657: BluetoothManager btManager = On 2014/06/19 08:56:34, henrika (OOO June 23-July 7) wrote: > Why do you remove try-catch here? Because before all we would do was catch the exception and then invoke Log.wtf, which will crash the app. Now we just crash due to an uncaught exception. If the intent was to just log the exception but continue execution of the app, we could use a less severe log and put the try/catch back in.
Fine as is. LGTM++ On Thu, Jun 19, 2014 at 11:23 AM, <benm@chromium.org> wrote: > > https://codereview.chromium.org/340083002/diff/1/media/ > base/android/java/src/org/chromium/media/AudioManagerAndroid.java > File > media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java > (right): > > https://codereview.chromium.org/340083002/diff/1/media/ > base/android/java/src/org/chromium/media/AudioManagerAndroid.java# > newcode657 > media/base/android/java/src/org/chromium/media/ > AudioManagerAndroid.java:657: > BluetoothManager btManager = > On 2014/06/19 08:56:34, henrika (OOO June 23-July 7) wrote: > >> Why do you remove try-catch here? >> > > Because before all we would do was catch the exception and then invoke > Log.wtf, which will crash the app. Now we just crash due to an uncaught > exception. > > If the intent was to just log the exception but continue execution of > the app, we could use a less severe log and put the try/catch back in. > > https://codereview.chromium.org/340083002/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
thanks!
The CQ bit was checked by benm@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benm@chromium.org/340083002/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/bu...)
The CQ bit was checked by benm@chromium.org
The CQ bit was unchecked by benm@chromium.org
+marcus for owners
lgtm, tiny nit: https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... File media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java (right): https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java:668: profileConnectionState = btAdapter.getProfileConnectionState( nit: unindent
https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... File media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java (right): https://codereview.chromium.org/340083002/diff/1/media/base/android/java/src/... media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java:668: profileConnectionState = btAdapter.getProfileConnectionState( On 2014/06/20 14:12:08, bulach wrote: > nit: unindent Done.
The CQ bit was checked by benm@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benm@chromium.org/340083002/20001
Message was sent while issue was closed.
Change committed as 278807 |