Add OOM checks on some GetDOMSlots() calls. Bug 280771, patch by Daniel de
Wildt <mozilla3q04@dewildt.de>, r+sr=jst git-svn-id: svn://10.0.0.236/trunk@168803 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
dac5070c7d
commit
0cfe7486a9
@ -1219,6 +1219,10 @@ nsGenericElement::GetAttributes(nsIDOMNamedNodeMap** aAttributes)
|
||||
NS_ENSURE_ARG_POINTER(aAttributes);
|
||||
nsDOMSlots *slots = GetDOMSlots();
|
||||
|
||||
if (!slots) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (!slots->mAttributeMap) {
|
||||
slots->mAttributeMap = new nsDOMAttributeMap(this);
|
||||
if (!slots->mAttributeMap) {
|
||||
@ -1236,6 +1240,10 @@ nsGenericElement::GetChildNodes(nsIDOMNodeList** aChildNodes)
|
||||
{
|
||||
nsDOMSlots *slots = GetDOMSlots();
|
||||
|
||||
if (!slots) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (!slots->mChildNodes) {
|
||||
slots->mChildNodes = new nsChildContentList(this);
|
||||
if (!slots->mChildNodes) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user