Merge pull request #2503 from minggo/evalString

fixed #2099:fixed a bug in ScriptingCore::evalString not setting the out...
This commit is contained in:
minggo 2013-05-01 18:04:21 -07:00
commit df242a15a9
1 changed files with 1 additions and 2 deletions

View File

@ -354,7 +354,6 @@ void ScriptingCore::string_report(jsval val) {
JSBool ScriptingCore::evalString(const char *string, jsval *outVal, const char *filename, JSContext* cx, JSObject* global)
{
jsval rval;
if (cx == NULL)
cx = cx_;
if (global == NULL)
@ -363,7 +362,7 @@ JSBool ScriptingCore::evalString(const char *string, jsval *outVal, const char *
if (script) {
// JSAutoCompartment ac(cx, global);
JSAutoCompartment ac(cx, global);
JSBool evaluatedOK = JS_ExecuteScript(cx, global, script, &rval);
JSBool evaluatedOK = JS_ExecuteScript(cx, global, script, outVal);
if (JS_FALSE == evaluatedOK) {
fprintf(stderr, "(evaluatedOK == JS_FALSE)\n");
}