Unregress indirect eval for benign cases such as venkman chrome calling content eval (293933, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@175673 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1132,11 +1132,8 @@ obj_eval(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
rt = cx->runtime;
|
||||
if (rt->findObjectPrincipals) {
|
||||
scopePrincipals = rt->findObjectPrincipals(cx, scopeobj);
|
||||
if (scopePrincipals != principals) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
||||
JSMSG_BAD_INDIRECT_CALL, js_eval_str);
|
||||
return JS_FALSE;
|
||||
}
|
||||
if (scopePrincipals != principals)
|
||||
scopeobj = OBJ_GET_PARENT(cx, JSVAL_TO_OBJECT(argv[-2]));
|
||||
}
|
||||
|
||||
ok = js_Execute(cx, scopeobj, script, caller, JSFRAME_EVAL, rval);
|
||||
|
||||
Reference in New Issue
Block a user