evalcx uses JS_BeginRequest/JS_EndRequest. bug 398045, r=mrbkap, not a part of the build.

This commit is contained in:
igor@mir2.org 2007-09-30 09:12:15 -07:00
parent 80e99ab94d
commit 6e02e43f6d

View File

@ -2372,6 +2372,9 @@ EvalInContext(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return JS_FALSE;
}
#ifdef JS_THREADSAFE
JS_BeginRequest(scx);
#endif
src = JS_GetStringChars(str);
srclen = JS_GetStringLength(str);
lazy = JS_FALSE;
@ -2406,6 +2409,9 @@ EvalInContext(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
}
out:
#ifdef JS_THREADSAFE
JS_EndRequest(scx);
#endif
JS_DestroyContext(scx);
return ok;
}