зеркало из https://github.com/mozilla/pjs.git
trivial change to reduce CW compiler memory demands. r=ducarroz
This commit is contained in:
Родитель
c3f49cc848
Коммит
30cb4feb4b
|
@ -1150,7 +1150,6 @@ FAIL:
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PRInt32
|
PRInt32
|
||||||
|
@ -1665,36 +1664,41 @@ nsMsgComposeAndSend::ProcessMultipartRelated(PRInt32 *aMailboxCount, PRInt32 *aN
|
||||||
// Ok, now we need to get the element in the array and do the magic
|
// Ok, now we need to get the element in the array and do the magic
|
||||||
// to process this element.
|
// to process this element.
|
||||||
//
|
//
|
||||||
nsCOMPtr<nsIDOMNode> node;
|
nsCOMPtr<nsIDOMNode> node;
|
||||||
nsCOMPtr <nsISupports> isupp = getter_AddRefs(aNodeList->ElementAt(locCount));
|
|
||||||
|
|
||||||
if (!isupp) {
|
{
|
||||||
return NS_ERROR_MIME_MPART_ATTACHMENT_ERROR;
|
nsCOMPtr <nsISupports> isupp = getter_AddRefs(aNodeList->ElementAt(locCount));
|
||||||
|
|
||||||
|
if (!isupp) {
|
||||||
|
return NS_ERROR_MIME_MPART_ATTACHMENT_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
node = do_QueryInterface(isupp);
|
||||||
|
if (!node) {
|
||||||
|
return NS_ERROR_MIME_MPART_ATTACHMENT_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
node = do_QueryInterface(isupp);
|
|
||||||
if (!node) {
|
|
||||||
return NS_ERROR_MIME_MPART_ATTACHMENT_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
j++;
|
j++;
|
||||||
domSaveArray[j].node = node;
|
domSaveArray[j].node = node;
|
||||||
|
|
||||||
|
|
||||||
// Check if the object has an moz-do-not-send attribute set. If it's the case,
|
// Check if the object has an moz-do-not-send attribute set. If it's the case,
|
||||||
// we must ignore it and just continue with the next one
|
// we must ignore it and just continue with the next one
|
||||||
nsCOMPtr<nsIDOMElement> domElement = do_QueryInterface(node);
|
|
||||||
if (domElement)
|
|
||||||
{
|
{
|
||||||
nsAutoString attributeValue;
|
nsCOMPtr<nsIDOMElement> domElement = do_QueryInterface(node);
|
||||||
if (NS_SUCCEEDED(domElement->GetAttribute(NS_LITERAL_STRING("moz-do-not-send"), attributeValue)))
|
if (domElement)
|
||||||
{
|
{
|
||||||
if (attributeValue.Equals(NS_LITERAL_STRING("true"),
|
nsAutoString attributeValue;
|
||||||
nsCaseInsensitiveStringComparator()))
|
if (NS_SUCCEEDED(domElement->GetAttribute(NS_LITERAL_STRING("moz-do-not-send"), attributeValue)))
|
||||||
continue;
|
{
|
||||||
|
if (attributeValue.Equals(NS_LITERAL_STRING("true"),
|
||||||
|
nsCaseInsensitiveStringComparator()))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now, we know the types of objects this node can be, so we will do
|
// Now, we know the types of objects this node can be, so we will do
|
||||||
// our query interface here and see what we come up with
|
// our query interface here and see what we come up with
|
||||||
nsCOMPtr<nsIDOMHTMLBodyElement> body = (do_QueryInterface(node));
|
nsCOMPtr<nsIDOMHTMLBodyElement> body = (do_QueryInterface(node));
|
||||||
|
@ -1822,28 +1826,29 @@ nsMsgComposeAndSend::ProcessMultipartRelated(PRInt32 *aMailboxCount, PRInt32 *aN
|
||||||
//
|
//
|
||||||
// Before going further, check if we are dealing with a local file and
|
// Before going further, check if we are dealing with a local file and
|
||||||
// if it's the case be sure the file exist!
|
// if it's the case be sure the file exist!
|
||||||
nsCOMPtr<nsIFileURL> fileUrl (do_QueryInterface(attachment.url));
|
|
||||||
if (fileUrl)
|
|
||||||
{
|
{
|
||||||
PRBool isAValidFile = PR_FALSE;
|
nsCOMPtr<nsIFileURL> fileUrl (do_QueryInterface(attachment.url));
|
||||||
|
if (fileUrl)
|
||||||
nsCOMPtr<nsIFile> aFile;
|
|
||||||
rv = fileUrl->GetFile(getter_AddRefs(aFile));
|
|
||||||
if (NS_SUCCEEDED(rv) && aFile)
|
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsILocalFile> aLocalFile (do_QueryInterface(aFile));
|
PRBool isAValidFile = PR_FALSE;
|
||||||
if (aLocalFile)
|
|
||||||
|
nsCOMPtr<nsIFile> aFile;
|
||||||
|
rv = fileUrl->GetFile(getter_AddRefs(aFile));
|
||||||
|
if (NS_SUCCEEDED(rv) && aFile)
|
||||||
{
|
{
|
||||||
rv = aLocalFile->IsFile(&isAValidFile);
|
nsCOMPtr<nsILocalFile> aLocalFile (do_QueryInterface(aFile));
|
||||||
if (NS_FAILED(rv))
|
if (aLocalFile)
|
||||||
isAValidFile = PR_FALSE;
|
{
|
||||||
|
rv = aLocalFile->IsFile(&isAValidFile);
|
||||||
|
if (NS_FAILED(rv))
|
||||||
|
isAValidFile = PR_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if (! isAValidFile)
|
||||||
if (! isAValidFile)
|
continue;
|
||||||
continue;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now we have to get all of the interesting information from
|
// Now we have to get all of the interesting information from
|
||||||
|
|
Загрузка…
Ссылка в новой задаче