Bug 1417356 - xpcshell doesn't have Java thread. r=jchen

This is a regression by bug 1403690.  After landing this, some xpcshell tests
cause crash with stylo.

mozilla::java::GeckoAppShell::GetShowPasswordSetting doesn't work on xpcshell
test.  If JNI isn't available such as xpcshell, we shouldn't use this method.

MozReview-Commit-ID: AUrT93SkQ2H

--HG--
extra : rebase_source : 2147a42633ea98e3a4d891af832f28c105d5dcf8
This commit is contained in:
Makoto Kato 2017-11-16 12:25:26 +09:00
parent a710f595fa
commit 8fbfdec507

View File

@ -515,7 +515,7 @@ nsLookAndFeel::EnsureInitShowPassword()
{
if (!mInitializedShowPassword) {
if (XRE_IsParentProcess()) {
mShowPassword = java::GeckoAppShell::GetShowPasswordSetting();
mShowPassword = jni::IsAvailable() && java::GeckoAppShell::GetShowPasswordSetting();
} else {
ContentChild::GetSingleton()->SendGetShowPasswordSetting(&mShowPassword);
}