Bug 585501: innerize window before using it as a scope chain in NPN_Evaluate, r=mrbkap

This commit is contained in:
David Mandelin 2010-08-10 16:11:32 -07:00
parent 16585a758c
commit ac09edcf6c

View File

@ -1572,6 +1572,8 @@ _evaluate(NPP npp, NPObject* npobj, NPString *script, NPVariant *result)
return false;
}
OBJ_TO_INNER_OBJECT(cx, obj);
// Root obj and the rval (below).
jsval vec[] = { OBJECT_TO_JSVAL(obj), JSVAL_NULL };
js::AutoArrayRooter tvr(cx, NS_ARRAY_LENGTH(vec), vec);