mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 15:51:37 +00:00
Fix for crasher bugs 37701 and 37728. r=mjudge@netscape.com
This commit is contained in:
parent
104709c453
commit
65b72822ba
@ -1792,14 +1792,18 @@ nsSelection::GetFrameForNodeOffset(nsIContent *aNode, PRInt32 aOffset, nsIFrame
|
||||
childIndex = aOffset;
|
||||
}
|
||||
|
||||
result = theNode->ChildAt(childIndex, *getter_AddRefs(theNode));
|
||||
nsCOMPtr<nsIContent> childNode;
|
||||
|
||||
result = theNode->ChildAt(childIndex, *getter_AddRefs(childNode));
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
if (!theNode)
|
||||
if (!childNode)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
theNode = childNode;
|
||||
|
||||
#ifdef DONT_DO_THIS_YET
|
||||
// XXX: We can't use this code yet because the hinting
|
||||
// can cause us to attatch to the wrong line frame.
|
||||
|
@ -1792,14 +1792,18 @@ nsSelection::GetFrameForNodeOffset(nsIContent *aNode, PRInt32 aOffset, nsIFrame
|
||||
childIndex = aOffset;
|
||||
}
|
||||
|
||||
result = theNode->ChildAt(childIndex, *getter_AddRefs(theNode));
|
||||
nsCOMPtr<nsIContent> childNode;
|
||||
|
||||
result = theNode->ChildAt(childIndex, *getter_AddRefs(childNode));
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
if (!theNode)
|
||||
if (!childNode)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
theNode = childNode;
|
||||
|
||||
#ifdef DONT_DO_THIS_YET
|
||||
// XXX: We can't use this code yet because the hinting
|
||||
// can cause us to attatch to the wrong line frame.
|
||||
|
@ -1792,14 +1792,18 @@ nsSelection::GetFrameForNodeOffset(nsIContent *aNode, PRInt32 aOffset, nsIFrame
|
||||
childIndex = aOffset;
|
||||
}
|
||||
|
||||
result = theNode->ChildAt(childIndex, *getter_AddRefs(theNode));
|
||||
nsCOMPtr<nsIContent> childNode;
|
||||
|
||||
result = theNode->ChildAt(childIndex, *getter_AddRefs(childNode));
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
if (!theNode)
|
||||
if (!childNode)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
theNode = childNode;
|
||||
|
||||
#ifdef DONT_DO_THIS_YET
|
||||
// XXX: We can't use this code yet because the hinting
|
||||
// can cause us to attatch to the wrong line frame.
|
||||
|
Loading…
x
Reference in New Issue
Block a user