Bug 1357002 - Part 2: Don't call SetupCustomElement() if the custom element feature is pref-ed off; r=wchen

This commit is contained in:
Edgar Chen
2017-04-17 18:34:26 +08:00
parent c6ae645e0b
commit 8547b9762b

View File

@@ -263,7 +263,8 @@ NS_NewHTMLElement(Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&&
return NS_ERROR_OUT_OF_MEMORY;
}
if (isCustomElementName || aIs) {
if (CustomElementRegistry::IsCustomElementEnabled() &&
(isCustomElementName || aIs)) {
nsContentUtils::SetupCustomElement(*aResult, aIs);
}