зеркало из https://github.com/mozilla/gecko-dev.git
fix 45184 crash involving rdf literals r=alecf
This commit is contained in:
Родитель
2d4726af0f
Коммит
fc44c4b455
|
@ -970,10 +970,10 @@ nsresult nsMsgMessageDataSource::OnChangeStatusString(nsIRDFResource *resource,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = createStatusNodeFromFlag(newFlag, getter_AddRefs(newNode), PR_TRUE);
|
||||
NS_ENSURE_TRUE(rv, rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = NotifyPropertyChanged(resource, kNC_StatusString, newNode);
|
||||
NS_ENSURE_TRUE(rv, rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
@ -1399,6 +1399,8 @@ nsMsgMessageDataSource::createStatusNodeFromFlag(PRUint32 flags, /*nsAutoString
|
|||
*node = (needDisplayString) ? kNewLiteralDisplayString : kNewLiteral;
|
||||
else if(flags & MSG_FLAG_READ)
|
||||
*node = (needDisplayString) ? kReadLiteralDisplayString : kReadLiteral;
|
||||
|
||||
NS_IF_ADDREF(*node);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -345,6 +345,11 @@ NS_IMETHODIMP nsMsgDBFolder::GetFirstNewMessage(nsIMessage **firstNewMessage)
|
|||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (!hdr)
|
||||
{
|
||||
*firstNewMessage = nsnull;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
rv = CreateMessageFromMsgDBHdr(hdr, firstNewMessage);
|
||||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
|
@ -432,6 +437,11 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo(PRBool force)
|
|||
if (!mInitializedFromCache)
|
||||
{
|
||||
folderInfo->GetFlags((PRInt32 *)&mFlags);
|
||||
#ifdef DEBUG_bienvenu
|
||||
nsXPIDLString name;
|
||||
GetName(getter_Copies(name));
|
||||
NS_ASSERTION(nsCRT::strcmp(name, "Trash") || (mFlags & MSG_FOLDER_FLAG_TRASH), "lost trash flag");
|
||||
#endif
|
||||
mInitializedFromCache = PR_TRUE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче