зеркало из https://github.com/mozilla/gecko-dev.git
bug 103804, "Venkman doesn't like stopping in timeouts", r=jband, sr=shaver
move from setTimeout to the new enterNestedEventLoop callback some strict mode changes fix file/line regexps
This commit is contained in:
Родитель
a56cf30d34
Коммит
f6ea7f8d8d
|
@ -70,6 +70,8 @@ console._executionHook = {
|
||||||
onExecute: function exehook (frame, type, rv) {
|
onExecute: function exehook (frame, type, rv) {
|
||||||
if (frame.script && frame.script.fileName != MSG_VAL_CONSOLE)
|
if (frame.script && frame.script.fileName != MSG_VAL_CONSOLE)
|
||||||
return debugTrap(frame, type, rv);
|
return debugTrap(frame, type, rv);
|
||||||
|
ASSERT (frame.script, "Execution hook called with no script");
|
||||||
|
return jsdIExecutionHook.RETURN_CONTINUE;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -348,9 +350,8 @@ function debugTrap (frame, type, rv)
|
||||||
console.frames.push(frame);
|
console.frames.push(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout (console.onDebugTrap, 100, type);
|
console.trapType = type;
|
||||||
|
console.jsds.enterNestedEventLoop({onNest: console.onDebugTrap});
|
||||||
console.jsds.enterNestedEventLoop();
|
|
||||||
|
|
||||||
/* execution pauses here until someone calls
|
/* execution pauses here until someone calls
|
||||||
* console.dbg.exitNestedEventLoop()
|
* console.dbg.exitNestedEventLoop()
|
||||||
|
@ -370,6 +371,7 @@ function debugTrap (frame, type, rv)
|
||||||
$ = new Array();
|
$ = new Array();
|
||||||
clearCurrentFrame();
|
clearCurrentFrame();
|
||||||
delete console.frames;
|
delete console.frames;
|
||||||
|
delete console.trapType;
|
||||||
|
|
||||||
console.onDebugContinue();
|
console.onDebugContinue();
|
||||||
|
|
||||||
|
|
|
@ -106,9 +106,10 @@ function con_reload ()
|
||||||
}
|
}
|
||||||
|
|
||||||
console.onDebugTrap =
|
console.onDebugTrap =
|
||||||
function con_ondt (type)
|
function con_ondt ()
|
||||||
{
|
{
|
||||||
var frame = setCurrentFrameByIndex(0);
|
var frame = setCurrentFrameByIndex(0);
|
||||||
|
var type = console.trapType;
|
||||||
|
|
||||||
if (type != jsdIExecutionHook.TYPE_INTERRUPTED ||
|
if (type != jsdIExecutionHook.TYPE_INTERRUPTED ||
|
||||||
console._lastStackDepth != console.frames.length)
|
console._lastStackDepth != console.frames.length)
|
||||||
|
@ -155,10 +156,20 @@ function con_fchanged (currentFrame, currentFrameIndex)
|
||||||
|
|
||||||
if (currentFrame)
|
if (currentFrame)
|
||||||
{
|
{
|
||||||
var frame = stack.childData[currentFrameIndex];
|
var frameRecord = stack.childData[currentFrameIndex];
|
||||||
var vr = frame.calculateVisualRow();
|
var vr = frameRecord.calculateVisualRow();
|
||||||
console.stackView.selectedIndex = vr;
|
console.stackView.selectedIndex = vr;
|
||||||
console.stackView.scrollTo (vr, 0);
|
console.stackView.scrollTo (vr, 0);
|
||||||
|
var source = console.scripts[currentFrame.script.fileName];
|
||||||
|
if (source)
|
||||||
|
{
|
||||||
|
console.sourceView.displaySource(source);
|
||||||
|
console.sourceView.softScrollTo(currentFrame.line);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dd ("frame from unknown source");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -166,10 +177,6 @@ function con_fchanged (currentFrame, currentFrameIndex)
|
||||||
stack.childData = new Array();
|
stack.childData = new Array();
|
||||||
stack.hide();
|
stack.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.sourceView.outliner.invalidate(); /* invalidate to show the new
|
|
||||||
* currentLine */
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.onInputCommand =
|
console.onInputCommand =
|
||||||
|
@ -229,7 +236,7 @@ function cli_ibreak(e)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ary = e.inputData.match(/([^\s\:]+)\:?\s*(\d+)\s*$/);
|
var ary = e.inputData.match(/([^\s]+)\s*(\d+)\s*$/);
|
||||||
if (!ary)
|
if (!ary)
|
||||||
{
|
{
|
||||||
console.displayUsageError(e.commandEntry);
|
console.displayUsageError(e.commandEntry);
|
||||||
|
@ -253,7 +260,7 @@ function cli_ibreak(e)
|
||||||
console.onInputClear =
|
console.onInputClear =
|
||||||
function cli_iclear (e)
|
function cli_iclear (e)
|
||||||
{
|
{
|
||||||
var ary = e.inputData.match(/(\d+)|([^\s\:]+)\:?\s*(\d+)\s*$/);
|
var ary = e.inputData.match(/(\d+)|([^\s]+)\s*(\d+)\s*$/);
|
||||||
if (!ary)
|
if (!ary)
|
||||||
{
|
{
|
||||||
console.displayUsageError(e.commandEntry);
|
console.displayUsageError(e.commandEntry);
|
||||||
|
@ -382,7 +389,7 @@ function cli_ifbreak(e)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ary = e.inputData.match(/([^\s\:]+)\:?\s*(\d+)\s*$/);
|
var ary = e.inputData.match(/([^\s]+)\s*(\d+)\s*$/);
|
||||||
if (!ary)
|
if (!ary)
|
||||||
{
|
{
|
||||||
console.displayUsageError(e.commandEntry);
|
console.displayUsageError(e.commandEntry);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче