Bug 1190608, part 3 - Remove some infallible new checks in nsXULElement.cpp. r=poiru

This commit is contained in:
Andrew McCreight 2015-08-04 13:06:14 -07:00
parent 7344424fe7
commit 5765502677

View File

@ -292,10 +292,6 @@ nsXULElement::Create(nsXULPrototypeElement* aPrototype,
nsRefPtr<nsXULElement> element = Create(aPrototype, nodeInfo,
aIsScriptable, aIsRoot);
if (!element) {
return NS_ERROR_OUT_OF_MEMORY;
}
element.forget(aResult);
return NS_OK;
@ -2343,8 +2339,6 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
switch (childType) {
case eType_Element:
child = new nsXULPrototypeElement();
if (! child)
return NS_ERROR_OUT_OF_MEMORY;
child->mType = childType;
tmp = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
@ -2355,8 +2349,6 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
break;
case eType_Text:
child = new nsXULPrototypeText();
if (! child)
return NS_ERROR_OUT_OF_MEMORY;
child->mType = childType;
tmp = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
@ -2367,8 +2359,6 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
break;
case eType_PI:
child = new nsXULPrototypePI();
if (! child)
return NS_ERROR_OUT_OF_MEMORY;
child->mType = childType;
tmp = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
@ -2380,8 +2370,6 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
case eType_Script: {
// language version/options obtained during deserialization.
nsXULPrototypeScript* script = new nsXULPrototypeScript(0, 0);
if (! script)
return NS_ERROR_OUT_OF_MEMORY;
child = script;
child->mType = childType;