diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index a2aee1ba1146..c67d3aa24dff 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -933,14 +933,12 @@ 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())