Bug 1269316 - Port bug 1193762 to comm-central (bustage fix). r=mkmelin a=bustage fix on a CLOSED TREE
This commit is contained in:
Родитель
067002a8be
Коммит
1bc24e5bca
|
@ -157,7 +157,8 @@ calDateTime::SetNativeTime(PRTime aNativeTime)
|
|||
{
|
||||
icaltimetype icalt;
|
||||
PRTimeToIcaltime(aNativeTime, false, icaltimezone_get_utc_timezone(), &icalt);
|
||||
FromIcalTime(&icalt, cal::UTC());
|
||||
nsCOMPtr<calITimezone> ctz = cal::UTC();
|
||||
FromIcalTime(&icalt, ctz);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -473,12 +474,14 @@ void calDateTime::FromIcalTime(icaltimetype const* icalt, calITimezone * tz)
|
|||
#if defined(DEBUG)
|
||||
if (mTimezone) {
|
||||
if (t.is_utc) {
|
||||
NS_ASSERTION(SameCOMIdentity(mTimezone, cal::UTC()), "UTC mismatch!");
|
||||
nsCOMPtr<calITimezone> ctz = cal::UTC();
|
||||
NS_ASSERTION(SameCOMIdentity(mTimezone, ctz), "UTC mismatch!");
|
||||
} else if (!t.zone) {
|
||||
nsAutoCString tzid;
|
||||
mTimezone->GetTzid(tzid);
|
||||
if (tzid.EqualsLiteral("floating")) {
|
||||
NS_ASSERTION(SameCOMIdentity(mTimezone, cal::floating()), "floating mismatch!");
|
||||
nsCOMPtr<calITimezone> ctz = cal::floating();
|
||||
NS_ASSERTION(SameCOMIdentity(mTimezone, ctz), "floating mismatch!");
|
||||
}
|
||||
} else {
|
||||
nsAutoCString tzid;
|
||||
|
|
|
@ -188,7 +188,7 @@ calRecurrenceRule::GetUntilDate(calIDateTime * *aRecurEnd)
|
|||
NS_ADDREF(*aRecurEnd);
|
||||
} else {
|
||||
// infinite recurrence
|
||||
*aRecurEnd = nullptr;
|
||||
*aRecurEnd = nullptr;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -207,7 +207,8 @@ calRecurrenceRule::SetUntilDate(calIDateTime * aRecurEnd)
|
|||
NS_SUCCEEDED(tz->GetIsFloating(&b)) && !b) {
|
||||
// convert to UTC:
|
||||
nsCOMPtr<calIDateTime> dt;
|
||||
aRecurEnd->GetInTimezone(cal::UTC(), getter_AddRefs(dt));
|
||||
nsCOMPtr<calITimezone> ctz = cal::UTC();
|
||||
aRecurEnd->GetInTimezone(ctz, getter_AddRefs(dt));
|
||||
icaldt = do_QueryInterface(dt, &rv);
|
||||
} else {
|
||||
icaldt = do_QueryInterface(aRecurEnd, &rv);
|
||||
|
|
|
@ -274,7 +274,7 @@ nsLDAPOperation::SimpleBind(const nsACString& passwd)
|
|||
if (!passwd.IsEmpty())
|
||||
mSavePassword = passwd;
|
||||
|
||||
NS_PRECONDITION(mMessageListener != 0, "MessageListener not set");
|
||||
NS_PRECONDITION(mMessageListener, "MessageListener not set");
|
||||
|
||||
rv = connection->GetBindName(bindName);
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -520,7 +520,7 @@ nsLDAPOperation::AbandonExt()
|
|||
nsresult rv;
|
||||
nsresult retStatus = NS_OK;
|
||||
|
||||
if ( mMessageListener == 0 || mMsgID == 0 ) {
|
||||
if (!mMessageListener || mMsgID == 0) {
|
||||
NS_ERROR("nsLDAPOperation::AbandonExt(): mMessageListener or "
|
||||
"mMsgId not initialized");
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
@ -596,7 +596,7 @@ nsLDAPOperation::AddExt(const char *base,
|
|||
LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls)
|
||||
{
|
||||
if (mMessageListener == 0) {
|
||||
if (!mMessageListener) {
|
||||
NS_ERROR("nsLDAPOperation::AddExt(): mMessageListener not set");
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ nsLDAPOperation::DeleteExt(const char *base,
|
|||
LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls)
|
||||
{
|
||||
if (mMessageListener == 0) {
|
||||
if (!mMessageListener) {
|
||||
NS_ERROR("nsLDAPOperation::DeleteExt(): mMessageListener not set");
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
@ -761,7 +761,7 @@ nsLDAPOperation::ModifyExt(const char *base,
|
|||
LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls)
|
||||
{
|
||||
if (mMessageListener == 0) {
|
||||
if (!mMessageListener) {
|
||||
NS_ERROR("nsLDAPOperation::ModifyExt(): mMessageListener not set");
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
@ -876,7 +876,7 @@ nsLDAPOperation::Rename(const char *base,
|
|||
LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls)
|
||||
{
|
||||
if (mMessageListener == 0) {
|
||||
if (!mMessageListener) {
|
||||
NS_ERROR("nsLDAPOperation::Rename(): mMessageListener not set");
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
|
|
@ -4762,7 +4762,7 @@ nsIMsgThread * nsMsgDatabase::GetThreadForThreadId(nsMsgKey threadId)
|
|||
{
|
||||
|
||||
nsIMsgThread *retThread = (threadId == m_cachedThreadId && m_cachedThread) ?
|
||||
m_cachedThread : FindExistingThread(threadId);
|
||||
m_cachedThread.get() : FindExistingThread(threadId);
|
||||
if (retThread)
|
||||
{
|
||||
NS_ADDREF(retThread);
|
||||
|
|
|
@ -2234,7 +2234,7 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMessages(nsIArray *messages,
|
|||
{
|
||||
rootFolder->GetFolderWithFlags(nsMsgFolderFlags::Trash,
|
||||
getter_AddRefs(trashFolder));
|
||||
NS_ASSERTION(trashFolder != 0, "couldn't find trash");
|
||||
NS_ASSERTION(trashFolder, "couldn't find trash");
|
||||
// if we can't find the trash, we'll just have to do an imap delete and pretend this is the trash
|
||||
if (!trashFolder)
|
||||
deleteImmediatelyNoTrash = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче