Issue #1258 - Follow up to Part 8: Ifdef MailNews OAuth2 Support

This commit is contained in:
Matt A. Tobin 2019-11-12 20:13:48 -05:00 committed by Roy Tam
commit fe11727f3d

View file

@ -5626,6 +5626,7 @@ void nsImapProtocol::InitPrefAuthMethods(int32_t authMethodPrefValue)
}
#ifdef MOZ_MAILNEWS_OAUTH2
if (m_prefAuthMethods & kHasXOAuth2Capability)
mOAuth2Support = new mozilla::mailnews::OAuth2ThreadHelper(aServer);
@ -5633,6 +5634,7 @@ void nsImapProtocol::InitPrefAuthMethods(int32_t authMethodPrefValue)
if (m_prefAuthMethods & kHasXOAuth2Capability &&
(!mOAuth2Support || !mOAuth2Support->SupportsOAuth2()))
m_prefAuthMethods &= ~kHasXOAuth2Capability;
#endif
NS_ASSERTION(m_prefAuthMethods != kCapabilityUndefined,
"IMAP: InitPrefAuthMethods() didn't work");