Commit aa3db270 authored by Victor Hugo Vianna Silva's avatar Victor Hugo Vianna Silva Committed by Commit Bot

Refactor: Flip condition in CallbackHelper

Flipping the condition to refer to exception thrown by its branch
makes the method more readable.

Bug: None
Change-Id: I7b7d0bff7f9a43cc2664ee0f31d5a25767439ec2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414035Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#807440}
parent e1394758
...@@ -190,7 +190,7 @@ public class CallbackHelper { ...@@ -190,7 +190,7 @@ public class CallbackHelper {
Assert.fail(s); Assert.fail(s);
} }
} }
if (callCountWhenDoneWaiting > mCallCount) { if (timer.isTimedOut()) {
throw new TimeoutException(msg == null ? "waitForCallback timed out!" : msg); throw new TimeoutException(msg == null ? "waitForCallback timed out!" : msg);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment