Bug 983282 followup - root the IsRegisterElementEnabled parameter
authorSteve Fink <sfink@mozilla.com>
Tue, 18 Mar 2014 20:25:15 -0700
changeset 174230 a23eb9fd15832d85c9f1899e854176e27afcda7a
parent 174229 d2bc5ad5421521ec9dbb218cdc2cb5190f055132
child 174231 2709c36738d11d007eab94da3d0745ce665d7c3a
push id41225
push usersfink@mozilla.com
push dateWed, 19 Mar 2014 03:31:43 +0000
treeherdermozilla-inbound@a23eb9fd1583 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs983282
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 983282 followup - root the IsRegisterElementEnabled parameter Landing on a CLOSED TREE.
content/base/src/nsDocument.cpp
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -5471,18 +5471,19 @@ nsDocument::CustomElementConstructor(JSC
   NS_ENSURE_SUCCESS(rv, true);
 
   return true;
 }
 
 bool
 nsDocument::IsRegisterElementEnabled(JSContext* aCx, JSObject* aObject)
 {
+  JS::Rooted<JSObject*> obj(aCx, aObject);
   return Preferences::GetBool("dom.webcomponents.enabled") ||
-    IsInCertifiedApp(aCx, aObject);
+    IsInCertifiedApp(aCx, obj);
 }
 
 nsresult
 nsDocument::RegisterUnresolvedElement(Element* aElement, nsIAtom* aTypeName)
 {
   if (!mRegistry) {
     return NS_OK;
   }