Bug 674171: Make the JavaScript shell's 'evaluate' function to return a value. r=jorendorff

This simplifies writing tests, since one can use common structure around
uses of both 'eval' (which produces "eval" frames) and 'evaluate' (which
produces "global" frames).
This commit is contained in:
Jim Blandy 2012-03-02 12:12:14 -08:00
parent 2e872d2ec9
commit 435129c819

View File

@ -866,8 +866,7 @@ Evaluate(JSContext *cx, unsigned argc, jsval *vp)
return false;
}
JS_SET_RVAL(cx, vp, JSVAL_VOID);
return JS_EvaluateUCScript(cx, thisobj, codeChars, codeLength, "@evaluate", 0, NULL);
return JS_EvaluateUCScript(cx, thisobj, codeChars, codeLength, "@evaluate", 0, vp);
}
static JSString *