Closed
Bug 967759
Opened 11 years ago
Closed 6 years ago
Remove unnecessary eval calls from frontend tests
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug)
Details
In bug 322176, we made the line numbers reported for eval more reasonable. However, it runs afoul of the many debugger front-end mochitests that have text like:
function firstCall() {
eval("secondCall();");
}
...
function secondCall() {
// This comment is useful: ☺
eval("debugger;");
function foo() {}
if (true) {
foo();
}
}
Before bug 332176, the eval code would be attributed to the line containing the eval call. Post-patch, the eval code is attributed to line 1 --- of the *evaluated* code. So all those mochitests had their expected line numbers changed from something like "6" or "18" to, simply, 1.
It turns out that those 'eval' calls are not essential to the tests. They predate the implementation of Debugger.prototype.findScripts, to a time when onNewScript notifications were the only way for the debugger to see a script --- so the tests used 'eval' to ensure that those notifications were generated. But we don't need them any more.
Since the 'eval' calls effectively erase meaningful information --- at what location were we executing? --- they should be removed from the debuggee code, and the original, meaningful line numbers reinstated.
(Kannan volunteered on IRC to take this on.)
Updated•11 years ago
|
Status: NEW → ASSIGNED
Updated•11 years ago
|
Priority: -- → P3
Updated•10 years ago
|
Summary: Debugger front end mochitests should lose gratuitous 'eval' calls → Remove unnecessary eval calls from frontend tests
Comment 2•10 years ago
|
||
Not volunteering for this anymore. My plate is pretty full. Trying to clear needinfos.
Flags: needinfo?(kvijayan)
Comment 3•10 years ago
|
||
Thanks for the update Kannan!
Comment 4•8 years ago
|
||
Bulk changing the status, as there is no assignee anymore.
Sebastian
Status: ASSIGNED → NEW
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 5•6 years ago
|
||
closing as we have re-written the mochitests
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•