зеркало из https://github.com/mozilla/gecko-dev.git
Bug 405372 - jsshell tracing() appears to work in JS_THREADED_INTERP builds but doesn't. r+a=brendan
This commit is contained in:
Родитель
8da0be8c33
Коммит
f1400d818f
11
js/src/js.c
11
js/src/js.c
|
@ -1448,6 +1448,10 @@ Tracing(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||||
JSBool bval;
|
JSBool bval;
|
||||||
JSString *str;
|
JSString *str;
|
||||||
|
|
||||||
|
#if JS_THREADED_INTERP
|
||||||
|
JS_ReportError(cx, "tracing not supported in JS_THREADED_INTERP builds");
|
||||||
|
return JS_FALSE;
|
||||||
|
#else
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
*rval = BOOLEAN_TO_JSVAL(cx->tracefp != 0);
|
*rval = BOOLEAN_TO_JSVAL(cx->tracefp != 0);
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
|
@ -1466,12 +1470,13 @@ Tracing(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||||
str = JS_ValueToString(cx, argv[0]);
|
str = JS_ValueToString(cx, argv[0]);
|
||||||
if (!str)
|
if (!str)
|
||||||
return JS_FALSE;
|
return JS_FALSE;
|
||||||
fprintf(gErrFile, "tracing: illegal argument %s\n",
|
JS_ReportError(cx, "tracing: illegal argument %s",
|
||||||
JS_GetStringBytes(str));
|
JS_GetStringBytes(str));
|
||||||
return JS_TRUE;
|
return JS_FALSE;
|
||||||
}
|
}
|
||||||
cx->tracefp = bval ? stderr : NULL;
|
cx->tracefp = bval ? stderr : NULL;
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Загрузка…
Ссылка в новой задаче