From fd7a325bc08f1f027b692181b6c7ab5efaf619aa Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 17 Apr 2020 07:25:14 -0400 Subject: Bug 1422931 - Fix crash with slot element and make webcomponents preference per-doc Tag #1375 --- dom/html/HTMLSlotElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom/html') diff --git a/dom/html/HTMLSlotElement.cpp b/dom/html/HTMLSlotElement.cpp index 1ffde7274..b13729a09 100644 --- a/dom/html/HTMLSlotElement.cpp +++ b/dom/html/HTMLSlotElement.cpp @@ -16,7 +16,7 @@ NS_NewHTMLSlotElement(already_AddRefed&& aNodeInfo, mozilla::dom::FromParser aFromParser) { RefPtr nodeInfo(aNodeInfo); - if (nsDocument::IsWebComponentsEnabled(nodeInfo)) { + if (nsDocument::IsWebComponentsEnabled(nodeInfo->GetDocument())) { already_AddRefed nodeInfoArg(nodeInfo.forget()); return new mozilla::dom::HTMLSlotElement(nodeInfoArg); } -- cgit v1.2.3