mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1608301: Part 2 - Add an additional assertion type to XPCOMEventTarget and change them to throw AssertionErrors; r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D65635 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ef896c8896
commit
991c2ccac2
@ -39,7 +39,13 @@ public final class XPCOMEventTarget extends JNIObject implements IXPCOMEventTarg
|
||||
|
||||
public static void assertOnLauncherThread() {
|
||||
if (BuildConfig.DEBUG && !launcherThread().isOnCurrentThread()) {
|
||||
throw new IllegalThreadStateException("Expected to be running on XPCOM launcher thread");
|
||||
throw new AssertionError("Expected to be running on XPCOM launcher thread");
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertNotOnLauncherThread() {
|
||||
if (BuildConfig.DEBUG && launcherThread().isOnCurrentThread()) {
|
||||
throw new AssertionError("Expected to not be running on XPCOM launcher thread");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user