зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1193572, part 3 - Don't re-initialize mType for XUL proto elements. r=baku
These are already set in the constructor.
This commit is contained in:
Родитель
f248610a58
Коммит
5c5e123a34
|
@ -2332,24 +2332,18 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
|
||||||
switch (childType) {
|
switch (childType) {
|
||||||
case eType_Element:
|
case eType_Element:
|
||||||
child = new nsXULPrototypeElement();
|
child = new nsXULPrototypeElement();
|
||||||
child->mType = childType;
|
|
||||||
|
|
||||||
rv = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
|
rv = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
|
||||||
aNodeInfos);
|
aNodeInfos);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
||||||
break;
|
break;
|
||||||
case eType_Text:
|
case eType_Text:
|
||||||
child = new nsXULPrototypeText();
|
child = new nsXULPrototypeText();
|
||||||
child->mType = childType;
|
|
||||||
|
|
||||||
rv = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
|
rv = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
|
||||||
aNodeInfos);
|
aNodeInfos);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
||||||
break;
|
break;
|
||||||
case eType_PI:
|
case eType_PI:
|
||||||
child = new nsXULPrototypePI();
|
child = new nsXULPrototypePI();
|
||||||
child->mType = childType;
|
|
||||||
|
|
||||||
rv = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
|
rv = child->Deserialize(aStream, aProtoDoc, aDocumentURI,
|
||||||
aNodeInfos);
|
aNodeInfos);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
||||||
|
@ -2358,7 +2352,6 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
|
||||||
// language version/options obtained during deserialization.
|
// language version/options obtained during deserialization.
|
||||||
nsXULPrototypeScript* script = new nsXULPrototypeScript(0, 0);
|
nsXULPrototypeScript* script = new nsXULPrototypeScript(0, 0);
|
||||||
child = script;
|
child = script;
|
||||||
child->mType = childType;
|
|
||||||
|
|
||||||
rv = aStream->ReadBoolean(&script->mOutOfLine);
|
rv = aStream->ReadBoolean(&script->mOutOfLine);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
if (NS_WARN_IF(NS_FAILED(rv))) return rv;
|
||||||
|
@ -2384,6 +2377,7 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(child, "Don't append null to mChildren");
|
MOZ_ASSERT(child, "Don't append null to mChildren");
|
||||||
|
MOZ_ASSERT(child->mType == childType);
|
||||||
mChildren.AppendElement(child);
|
mChildren.AppendElement(child);
|
||||||
|
|
||||||
// Oh dear. Something failed during the deserialization.
|
// Oh dear. Something failed during the deserialization.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче