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

Issue 1398283002: Android: Add helper function to synchronously execute Callables on Handler (Closed)

Created:
5 years, 2 months ago by magjed_webrtc
Modified:
5 years, 2 months ago
Reviewers:
hbos
CC:
webrtc-reviews_webrtc.org, yujie_mao (webrtc), Andrew MacDonald, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Android: Add helper function to synchronously execute Callables on Handler TBR=hbos Committed: https://crrev.com/e9e366875992baf60caf5baaec302e2f1de013b2 Cr-Commit-Position: refs/heads/master@{#10246}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -0 lines) Patch
M talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java View 2 chunks +26 lines, -0 lines 2 comments Download

Messages

Total messages: 9 (1 generated)
magjed_webrtc
hbos - Please take a look. I need this helper function for an urgent bug, ...
5 years, 2 months ago (2015-10-12 07:15:26 UTC) #2
magjed_webrtc
Committed patchset #1 (id:1) manually as e9e366875992baf60caf5baaec302e2f1de013b2 (presubmit successful).
5 years, 2 months ago (2015-10-12 07:16:04 UTC) #3
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/e9e366875992baf60caf5baaec302e2f1de013b2 Cr-Commit-Position: refs/heads/master@{#10246}
5 years, 2 months ago (2015-10-12 07:16:10 UTC) #4
hbos
lgtm
5 years, 2 months ago (2015-10-12 08:18:00 UTC) #5
hbos
https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java File talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java (right): https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java#newcode121 talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java:121: throw new RuntimeException("Callable threw exception: " + e); On ...
5 years, 2 months ago (2015-10-12 08:20:19 UTC) #6
magjed_webrtc
https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java File talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java (right): https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java#newcode121 talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java:121: throw new RuntimeException("Callable threw exception: " + e); On ...
5 years, 2 months ago (2015-10-12 14:29:01 UTC) #7
hbos
On 2015/10/12 14:29:01, magjed_webrtc wrote: > https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java > File talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java (right): > > https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java#newcode121 > ...
5 years, 2 months ago (2015-10-12 15:12:07 UTC) #8
hbos
5 years, 2 months ago (2015-10-12 15:17:17 UTC) #9
Message was sent while issue was closed.
On 2015/10/12 15:12:07, hbos wrote:
> On 2015/10/12 14:29:01, magjed_webrtc wrote:
> >
>
https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/...
> > File talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java (right):
> > 
> >
>
https://codereview.webrtc.org/1398283002/diff/1/talk/app/webrtc/java/android/...
> > talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java:121: throw new
> > RuntimeException("Callable threw exception: " + e);
> > On 2015/10/12 08:20:19, hbos wrote:
> > > On second thought, this will catch InterruptedExceptions too and wrap them
> in
> > > RuntimeExceptions, meaning it will not get caught and it will crash.
> > > 
> > > You need to catch InterruptedException and rethrow it without wrapping
> > > separately. Fix in a follow-up CL.
> > 
> > Actually, this is correct. The InterruptedException has nothing to do with
the
> > callable. InterruptedException may be thrown by barrier.await() and that is
> > handled in 'awaitUninterruptibly(barrier)'.
> 
> http://i.imgur.com/wNP8CCQ.png
> Callable.call() is allowed to throw any Exception, including
> InterruptedException. You should not assume the implementation handles them.

nvm, lgtm again

Powered by Google App Engine
This is Rietveld 408576698