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

Differential Revision: https://phabricator.services.mozilla.com/D57699
This commit is contained in:
Sean Feng
2020-03-17 14:53:08 +00:00
parent 9c7d1ed939
commit e2b8b11349
15 changed files with 45 additions and 23 deletions

View File

@@ -80,8 +80,8 @@ nsresult HTMLScriptElement::Clone(dom::NodeInfo* aNodeInfo,
nsINode** aResult) const {
*aResult = nullptr;
HTMLScriptElement* it =
new HTMLScriptElement(do_AddRef(aNodeInfo), NOT_FROM_PARSER);
HTMLScriptElement* it = new (aNodeInfo->NodeInfoManager())
HTMLScriptElement(do_AddRef(aNodeInfo), NOT_FROM_PARSER);
nsCOMPtr<nsINode> kungFuDeathGrip = it;
nsresult rv = const_cast<HTMLScriptElement*>(this)->CopyInnerTo(it);