Closed
Bug 1414684
Opened 7 years ago
Closed 4 years ago
[jsdbg2] Debugger.Environment.prototype.callee should not return undefined for inner functions
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1663847
Tracking | Status | |
---|---|---|
firefox58 | --- | affected |
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Debugger.Environment.prototype.callee returns undefined on "declarative" environments if the referent environment is "hollow" (i.e., was optimized out). This is surprising to users, who expect environments for function calls to have functions associated with them.
This behavior was introduced deliberately in bug 1163520. In the implementation, fetching the callee of a hollow environment returns an internal function object, which should never be exposed to content.
Instead of returning undefined, the callee accessor should probably return an object like { optimizedOut: true }, like D.E.p.getVariable.
See also bug 1414683.
Updated•7 years ago
|
status-firefox58:
--- → affected
Priority: -- → P3
Updated•4 years ago
|
Blocks: js-debugger
Comment 1•4 years ago
•
|
||
I'm fixing this in 1663847. I'll post before and after screenshots of the debugger when I break on the console.log
here:
function outer(a, b) {
function inner(x, y) {
console.log("Hello");
return x + y;
}
return inner(a + 4, b + 6);
}
outer(1, 3);
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•