Bug 1052855 - Traces link to a first line of a function instead of the function declaration. r=fitzgen

This commit is contained in:
Jakub Jurovych 2014-08-19 14:56:00 +02:00
parent ee6624cb05
commit 9ad7b9239c
3 changed files with 5 additions and 9 deletions

View File

@ -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.");
}

View File

@ -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)
};
}

View File

@ -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");