Bug 907973 - Suppress an exact rooting non-hazard in ShellObjectMetadataCallback; r=bhackett

--HG--
extra : rebase_source : 3c2911f67d14375bc98580fc483cf61498ed8be3
This commit is contained in:
Terrence Cole 2013-08-21 12:44:00 -07:00
parent 0bf4aef42a
commit 83b46d17ec

View File

@ -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())