зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1618625: When resolving a XPCOMEventTarget, set its Java thread name; r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D64632 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
11c1a5975d
Коммит
cad95f20f4
|
@ -62,6 +62,14 @@ public final class XPCOMEventTarget extends JNIObject implements IXPCOMEventTarg
|
|||
} else {
|
||||
throw new RuntimeException("Attempt to assign to unknown thread named " + name);
|
||||
}
|
||||
|
||||
// Ensure that we see the right name in the Java debugger. We don't do this for mMainThread
|
||||
// because its name was already set (in this context, "main" is the GeckoThread).
|
||||
if (mMainThread != target) {
|
||||
target.execute(() -> {
|
||||
Thread.currentThread().setName(name);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Загрузка…
Ссылка в новой задаче