Bug 1377999 - Make DocumentType to adapt the DOMArena changes r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D62355

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sean Feng 2020-03-17 14:54:05 +00:00
parent 1d4b093969
commit e9d935ecfc

View File

@ -27,8 +27,9 @@ already_AddRefed<mozilla::dom::DocumentType> NS_NewDOMDocumentType(
nsGkAtoms::documentTypeNodeName, nullptr, kNameSpaceID_None,
nsINode::DOCUMENT_TYPE_NODE, aName);
RefPtr<mozilla::dom::DocumentType> docType = new mozilla::dom::DocumentType(
ni.forget(), aPublicId, aSystemId, aInternalSubset);
RefPtr<mozilla::dom::DocumentType> docType =
new (aNodeInfoManager) mozilla::dom::DocumentType(
ni.forget(), aPublicId, aSystemId, aInternalSubset);
return docType.forget();
}
@ -75,8 +76,8 @@ void DocumentType::GetInternalSubset(nsAString& aInternalSubset) const {
already_AddRefed<CharacterData> DocumentType::CloneDataNode(
mozilla::dom::NodeInfo* aNodeInfo, bool aCloneText) const {
return do_AddRef(new DocumentType(do_AddRef(aNodeInfo), mPublicId, mSystemId,
mInternalSubset));
return do_AddRef(new (aNodeInfo->NodeInfoManager()) DocumentType(
do_AddRef(aNodeInfo), mPublicId, mSystemId, mInternalSubset));
}
} // namespace dom