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

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sean Feng 2020-03-17 14:53:30 +00:00
Родитель 6d144fcf0d
Коммит 17552f5d3d
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -15,7 +15,10 @@ using namespace mozilla::dom;
nsresult NS_NewXMLElement(
Element** aInstancePtrResult,
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) {
RefPtr<nsXMLElement> it = new nsXMLElement(std::move(aNodeInfo));
RefPtr<mozilla::dom::NodeInfo> nodeInfo(std::move(aNodeInfo));
auto* nim = nodeInfo->NodeInfoManager();
RefPtr<nsXMLElement> it = new (nim) nsXMLElement(nodeInfo.forget());
it.forget(aInstancePtrResult);
return NS_OK;
}