Skip to content
Snippets Groups Projects
Commit d235b4cb authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Deuce wants js.exec() to support non-number return values via exit_code

<@Deuce> Just saying that if someone does the work of exit_code = {thing: function(x) { return secretsauce }); exit(); they should get away with it.
parent d33fa178
No related branches found
No related tags found
No related merge requests found
......@@ -466,7 +466,7 @@ js_execfile(JSContext *cx, uintN argc, jsval *arglist)
}
else {
jsval exit_code = JSVAL_VOID;
if(JS_GetProperty(cx, js_scope, "exit_code", &exit_code) && JSVAL_IS_NUMBER(exit_code))
if(JS_GetProperty(cx, js_scope, "exit_code", &exit_code) && exit_code != JSVAL_VOID)
rval = exit_code;
}
JS_SET_RVAL(cx, arglist, rval);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment