diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index ab31c9dd9f93..82c82bc72219 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -5476,8 +5476,9 @@ nsDocument::CustomElementConstructor(JSContext* aCx, unsigned aArgc, JS::Value* bool nsDocument::IsRegisterElementEnabled(JSContext* aCx, JSObject* aObject) { + JS::Rooted obj(aCx, aObject); return Preferences::GetBool("dom.webcomponents.enabled") || - IsInCertifiedApp(aCx, aObject); + IsInCertifiedApp(aCx, obj); } nsresult