Bug 907973 - Suppress an exact rooting non-hazard in ShellObjectMetadataCallback; r=bhackett
authorTerrence Cole <terrence@mozilla.com>
Wed, 21 Aug 2013 12:44:00 -0700
changeset 143986 446229c7ad13535b11886436789a7ca1f5ba17b7
parent 143985 2121b7b8179ab177539e101c5cd0eb40a1b7a20b
child 143987 eefc5a5ed6c9105b1118407c75dea250c07954f6
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbhackett
bugs907973
milestone26.0a1
Bug 907973 - Suppress an exact rooting non-hazard in ShellObjectMetadataCallback; r=bhackett
js/src/builtin/TestingFunctions.cpp
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -928,24 +928,22 @@ js::testingFunc_inParallelSection(JSCont
     return true;
 }
 
 static const char *ObjectMetadataPropertyName = "__objectMetadataFunction__";
 
 static bool
 ShellObjectMetadataCallback(JSContext *cx, JSObject **pmetadata)
 {
-    Value thisv = UndefinedValue();
-
     RootedValue fun(cx);
     if (!JS_GetProperty(cx, cx->global(), ObjectMetadataPropertyName, &fun))
         return false;
 
     RootedValue rval(cx);
-    if (!Invoke(cx, thisv, fun, 0, NULL, &rval))
+    if (!Invoke(cx, UndefinedValue(), fun, 0, NULL, &rval))
         return false;
 
     if (rval.isObject())
         *pmetadata = &rval.toObject();
 
     return true;
 }