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
--- a/widget/android/nsLookAndFeel.cpp
+++ b/widget/android/nsLookAndFeel.cpp
@@ -510,15 +510,17 @@ nsLookAndFeel::EnsureInitSystemColors()
}
}
void
nsLookAndFeel::EnsureInitShowPassword()
{
if (!mInitializedShowPassword) {
if (XRE_IsParentProcess()) {
- mShowPassword = java::GeckoAppShell::GetShowPasswordSetting();
+ mShowPassword = jni::IsAvailable() ?
+ java::GeckoAppShell::GetShowPasswordSetting() :
+ false; // xpcshell case
} else {
ContentChild::GetSingleton()->SendGetShowPasswordSetting(&mShowPassword);
}
mInitializedShowPassword = true;
}
}