Fix 355982, r=self.
git-svn-id: svn://10.0.0.236/trunk@213330 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -178,11 +178,13 @@ script_compile(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
|
||||
|
||||
/* XXX thread safety was completely neglected in this function... */
|
||||
oldscript = (JSScript *) JS_GetPrivate(cx, obj);
|
||||
for (fp = cx->fp; fp; fp = fp->down) {
|
||||
if (fp->script == oldscript) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
||||
JSMSG_SELF_MODIFYING_SCRIPT);
|
||||
return JS_FALSE;
|
||||
if (oldscript) {
|
||||
for (fp = cx->fp; fp; fp = fp->down) {
|
||||
if (fp->script == oldscript) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
||||
JSMSG_SELF_MODIFYING_SCRIPT);
|
||||
return JS_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user