Closed Bug 1670510 Opened 4 years ago Closed 4 years ago

Do not return function that ends before the specified line in findScript

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

testcase

var g = newGlobal({newCompartment: true});
var dbg = new Debugger();
var gw = dbg.addDebuggee(g);

g.eval(`
function f() {
}
`);

gc();
gc();

let url = thisFilename();
let line = 4;

// If the specified line is the next line after the function,
// the function shouldn't match.
assertEq(dbg.findScripts({url, line}).length, 0);

GetScriptLineExtent returns 1-origin line count, and debugger uses the value as 0-origin.

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe2336305997
Do not return function that ends before the specified line in findScript. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: