зеркало из https://github.com/mozilla/gecko-dev.git
Bug 632343 - Run debug tests under -d since debug mode is now asynchronous (r=luke)
This commit is contained in:
Родитель
8a6f9bda91
Коммит
027754166a
|
@ -95,6 +95,8 @@ class Test:
|
|||
test.valgrind = options.valgrind
|
||||
elif name == 'mjitalways':
|
||||
test.jitflags.append('-a')
|
||||
elif name == 'debug':
|
||||
test.jitflags.append('-d')
|
||||
else:
|
||||
print('warning: unrecognized |jit-test| attribute %s'%part)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
var a = new Array();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
function callee() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
function callee() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
function callee() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
this.__defineGetter__("someProperty", function () { evalInFrame(1, "var x = 'success'"); });
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
this.__defineGetter__("someProperty", function () { evalInFrame(1, "var x = 'success'"); });
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
this.__defineGetter__("someProperty", function () { evalInFrame(1, "x = 'success'"); });
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
function nop(){}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
function nop(){}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// |jit-test| mjitalways
|
||||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
function nop(){}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
var x = "failure";
|
||||
function main() { x = "success"; }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
var x = "notset";
|
||||
function main() { x = "failure"; }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
var x = "notset";
|
||||
function main() { x = "success"; }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
var result = "unset";
|
||||
function main() {
|
||||
result = "failure";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
function main() {
|
||||
debugger;
|
||||
return "failure";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
var result1 = "unset";
|
||||
var result2 = "failure";
|
||||
function main() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
function main() {
|
||||
try {
|
||||
throw "something";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
function main() {
|
||||
return "failure";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
function main() {
|
||||
return 1;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
function main() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
function main() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
function myparent(nested) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
function child() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
function main() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
function child() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// |jit-test| debug
|
||||
setDebug(true);
|
||||
x = "notset";
|
||||
function main() {
|
||||
|
|
|
@ -145,6 +145,9 @@ CompartmentHasLiveScripts(JSCompartment *comp)
|
|||
JS_FRIEND_API(JSBool)
|
||||
JS_SetDebugModeForCompartment(JSContext *cx, JSCompartment *comp, JSBool debug)
|
||||
{
|
||||
if (comp->debugMode == debug)
|
||||
return JS_TRUE;
|
||||
|
||||
// This should only be called when no scripts are live. It would even be
|
||||
// incorrect to discard just the non-live scripts' JITScripts because they
|
||||
// might share ICs with live scripts (bug 632343).
|
||||
|
|
|
@ -1745,9 +1745,16 @@ SetDebug(JSContext *cx, uintN argc, jsval *vp)
|
|||
JSSMSG_NOT_ENOUGH_ARGS, "setDebug");
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Debug mode can only be set when there is no JS code executing on the
|
||||
* stack. Unfortunately, that currently means that this call will fail
|
||||
* unless debug mode is already set to what you're trying to set it to.
|
||||
* In the future, this restriction may be lifted.
|
||||
*/
|
||||
|
||||
JS_SetDebugMode(cx, JSVAL_TO_BOOLEAN(argv[0]));
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
JSBool rv = JS_SetDebugMode(cx, JSVAL_TO_BOOLEAN(argv[0]));
|
||||
JS_SET_RVAL(cx, vp, rv ? JSVAL_TRUE : JSVAL_FALSE);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче