mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 143903 crash if I close the mail window while a save as dialog is open for a message attachment
patch by antonio.xu@sun.com r=dbaron sr=waterson
This commit is contained in:
parent
55eb2e7bc5
commit
296945c4b1
@ -8049,7 +8049,8 @@ nsCSSFrameConstructor::FindPreviousSibling(nsIPresShell* aPresShell,
|
||||
NS_ASSERTION(aPresShell && aContainer, "null arguments");
|
||||
|
||||
ChildIterator first, iter;
|
||||
ChildIterator::Init(aContainer, &first, &iter);
|
||||
nsresult rv = ChildIterator::Init(aContainer, &first, &iter);
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
iter.seek(aIndexInContainer);
|
||||
|
||||
PRUint8 childDisplay = UNSET_DISPLAY;
|
||||
@ -8115,7 +8116,8 @@ nsCSSFrameConstructor::FindNextSibling(nsIPresShell* aPresShell,
|
||||
const nsIContent* aChild)
|
||||
{
|
||||
ChildIterator iter, last;
|
||||
ChildIterator::Init(aContainer, &iter, &last);
|
||||
nsresult rv = ChildIterator::Init(aContainer, &iter, &last);
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
iter.seek(aIndexInContainer);
|
||||
|
||||
// Catch the case where someone tries to append
|
||||
|
@ -45,6 +45,10 @@ ChildIterator::Init(nsIContent* aContent,
|
||||
ChildIterator* aFirst,
|
||||
ChildIterator* aLast)
|
||||
{
|
||||
// Initialize out parameters to be equal, in case of failure.
|
||||
aFirst->mContent = aLast->mContent = nsnull;
|
||||
aFirst->mIndex = aLast->mIndex = 0;
|
||||
|
||||
NS_PRECONDITION(aContent != nsnull, "no content");
|
||||
if (! aContent)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
@ -8049,7 +8049,8 @@ nsCSSFrameConstructor::FindPreviousSibling(nsIPresShell* aPresShell,
|
||||
NS_ASSERTION(aPresShell && aContainer, "null arguments");
|
||||
|
||||
ChildIterator first, iter;
|
||||
ChildIterator::Init(aContainer, &first, &iter);
|
||||
nsresult rv = ChildIterator::Init(aContainer, &first, &iter);
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
iter.seek(aIndexInContainer);
|
||||
|
||||
PRUint8 childDisplay = UNSET_DISPLAY;
|
||||
@ -8115,7 +8116,8 @@ nsCSSFrameConstructor::FindNextSibling(nsIPresShell* aPresShell,
|
||||
const nsIContent* aChild)
|
||||
{
|
||||
ChildIterator iter, last;
|
||||
ChildIterator::Init(aContainer, &iter, &last);
|
||||
nsresult rv = ChildIterator::Init(aContainer, &iter, &last);
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
iter.seek(aIndexInContainer);
|
||||
|
||||
// Catch the case where someone tries to append
|
||||
|
@ -45,6 +45,10 @@ ChildIterator::Init(nsIContent* aContent,
|
||||
ChildIterator* aFirst,
|
||||
ChildIterator* aLast)
|
||||
{
|
||||
// Initialize out parameters to be equal, in case of failure.
|
||||
aFirst->mContent = aLast->mContent = nsnull;
|
||||
aFirst->mIndex = aLast->mIndex = 0;
|
||||
|
||||
NS_PRECONDITION(aContent != nsnull, "no content");
|
||||
if (! aContent)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
Loading…
Reference in New Issue
Block a user