зеркало из https://github.com/mozilla/pjs.git
Checking for null before deref: b=55358 r=a=buster
This commit is contained in:
Родитель
66f020d558
Коммит
51307aaffd
|
@ -7965,9 +7965,15 @@ FindPreviousAnonymousSibling(nsIPresShell* aPresShell,
|
|||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
aContainer->GetDocument(*getter_AddRefs(doc));
|
||||
NS_ASSERTION(doc, "null document from content element in FindPreviousAnonymousSibling");
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIDOMDocumentXBL> xblDoc(do_QueryInterface(doc));
|
||||
NS_ASSERTION(xblDoc, "null xblDoc for content element in FindPreviousAnonymousSibling");
|
||||
if (xblDoc) {
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aContainer));
|
||||
xblDoc->GetAnonymousNodes(elt, getter_AddRefs(nodeList));
|
||||
}
|
||||
}
|
||||
if (nodeList) {
|
||||
PRUint32 ctr,listLength;
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
|
@ -8031,9 +8037,15 @@ FindNextAnonymousSibling(nsIPresShell* aPresShell,
|
|||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
aContainer->GetDocument(*getter_AddRefs(doc));
|
||||
NS_ASSERTION(doc, "null document from content element in FindNextAnonymousSibling");
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIDOMDocumentXBL> xblDoc(do_QueryInterface(doc));
|
||||
NS_ASSERTION(xblDoc, "null xblDoc for content element in FindNextAnonymousSibling");
|
||||
if (xblDoc) {
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aContainer));
|
||||
xblDoc->GetAnonymousNodes(elt, getter_AddRefs(nodeList));
|
||||
}
|
||||
}
|
||||
if (nodeList) {
|
||||
PRUint32 ctr,listLength;
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
|
|
|
@ -7965,9 +7965,15 @@ FindPreviousAnonymousSibling(nsIPresShell* aPresShell,
|
|||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
aContainer->GetDocument(*getter_AddRefs(doc));
|
||||
NS_ASSERTION(doc, "null document from content element in FindPreviousAnonymousSibling");
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIDOMDocumentXBL> xblDoc(do_QueryInterface(doc));
|
||||
NS_ASSERTION(xblDoc, "null xblDoc for content element in FindPreviousAnonymousSibling");
|
||||
if (xblDoc) {
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aContainer));
|
||||
xblDoc->GetAnonymousNodes(elt, getter_AddRefs(nodeList));
|
||||
}
|
||||
}
|
||||
if (nodeList) {
|
||||
PRUint32 ctr,listLength;
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
|
@ -8031,9 +8037,15 @@ FindNextAnonymousSibling(nsIPresShell* aPresShell,
|
|||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
aContainer->GetDocument(*getter_AddRefs(doc));
|
||||
NS_ASSERTION(doc, "null document from content element in FindNextAnonymousSibling");
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIDOMDocumentXBL> xblDoc(do_QueryInterface(doc));
|
||||
NS_ASSERTION(xblDoc, "null xblDoc for content element in FindNextAnonymousSibling");
|
||||
if (xblDoc) {
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(aContainer));
|
||||
xblDoc->GetAnonymousNodes(elt, getter_AddRefs(nodeList));
|
||||
}
|
||||
}
|
||||
if (nodeList) {
|
||||
PRUint32 ctr,listLength;
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
|
|
Загрузка…
Ссылка в новой задаче