diff options
Diffstat (limited to 'couchjs/c_src/sm185.c')
-rw-r--r-- | couchjs/c_src/sm185.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/couchjs/c_src/sm185.c b/couchjs/c_src/sm185.c index 9815f15c..dd7dbb61 100644 --- a/couchjs/c_src/sm185.c +++ b/couchjs/c_src/sm185.c @@ -147,12 +147,14 @@ evalcx(JSContext *cx, uintN argc, jsval* vp) jsval rval; JSBool ret = JS_FALSE; + couch_args* args = (couch_args*) JS_GetContextPrivate(cx); + sandbox = NULL; if(!JS_ConvertArguments(cx, argc, argv, "S / o", &str, &sandbox)) { return JS_FALSE; } - subcx = JS_NewContext(JS_GetRuntime(cx), 8L * 1024L); + subcx = JS_NewContext(JS_GetRuntime(cx), args->stack_size); if(!subcx) { JS_ReportOutOfMemory(cx); return JS_FALSE; @@ -327,6 +329,7 @@ main(int argc, const char* argv[]) if(cx == NULL) return 1; + JS_SetContextPrivate(cx, args); JS_SetErrorReporter(cx, couch_error); JS_ToggleOptions(cx, JSOPTION_XML); |