зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1052855 - Traces link to a first line of a function instead of the function declaration. r=fitzgen
This commit is contained in:
Родитель
1cca7287da
Коммит
d625777813
|
@ -58,7 +58,7 @@ function clickTraceLog() {
|
|||
}
|
||||
|
||||
function testCorrectLine() {
|
||||
is(gDebugger.DebuggerView.editor.getCursor().line, 19,
|
||||
is(gDebugger.DebuggerView.editor.getCursor().line, 18,
|
||||
"The editor should have the function definition site's line selected.");
|
||||
}
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ TracerActor.prototype = {
|
|||
// statement in the function).
|
||||
packet.location = {
|
||||
url: aFrame.script.url,
|
||||
line: aFrame.script.getOffsetLine(aFrame.offset),
|
||||
line: aFrame.script.startLine,
|
||||
column: getOffsetColumn(aFrame.offset, aFrame.script)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -88,13 +88,9 @@ function test_enter_exit_frame()
|
|||
do_check_eq(traces[1].name, "foo");
|
||||
|
||||
// XXX: foo's definition is at tracerlocations.js:3:0, but Debugger.Script
|
||||
// does not provide complete definition locations (bug 901138). Therefore,
|
||||
// we use the first statement in the function (tracerlocations.js:4:2) as
|
||||
// an approximation.
|
||||
//
|
||||
// However, |column| will always be 0 until we can get bug 863089
|
||||
// fixed.
|
||||
check_location(traces[1].location, { url: url, line: 4, column: 0 });
|
||||
// does not provide complete definition locations (bug 901138). |column|
|
||||
// will always be 0 until we can get bug 863089 fixed.
|
||||
check_location(traces[1].location, { url: url, line: 3, column: 0 });
|
||||
check_location(traces[1].callsite, { url: url, line: 8, column: 0 });
|
||||
|
||||
do_check_eq(typeof traces[1].parameterNames, "object");
|
||||
|
|
Загрузка…
Ссылка в новой задаче