Created
May 18, 2012 22:12
-
-
Save jorendorff/2727853 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp | |
--- a/js/src/shell/js.cpp | |
+++ b/js/src/shell/js.cpp | |
@@ -824,22 +824,22 @@ Evaluate(JSContext *cx, unsigned argc, j | |
"evaluate"); | |
return false; | |
} | |
if (!JSVAL_IS_STRING(argv[0]) || (argc == 2 && JSVAL_IS_PRIMITIVE(argv[1]))) { | |
JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL, JSSMSG_INVALID_ARGS, "evaluate"); | |
return false; | |
} | |
- bool newContext; | |
- RootedVarObject global(cx, NULL); | |
+ bool newContext = false; | |
bool compileAndGo = true; | |
const char *fileName = "@evaluate"; | |
JSAutoByteString fileNameBytes; | |
unsigned lineNumber = 1; | |
+ RootedVarObject global(cx, NULL); | |
global = JS_GetGlobalForObject(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp))); | |
if (!global) | |
return false; | |
if (argc == 2) { | |
RootedVarObject options(cx, JSVAL_TO_OBJECT(argv[1])); | |
jsval v; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment