Closed Bug 1663847 Opened 4 years ago Closed 4 years ago

Replace Debugger's Environment.callee getter with calleeScript getter

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The callee getter returns null if IsInternalFunctionObject is true, but that can happen for debugger-created CallObjects. Worse, this happens more when TI is disabled because TI cheats by letting certain canonical functions escape to script in certain cases, so IsInternalFunctionObject will be false.

I think we can make devtools work with a Debugger.Script instead so let's try that.

This should fix bug 1414684 and some devtools tests when Warp is enabled.

Simplifies the implementation of Debugger.Object.parameterNames (for functions)
and reuses it for scripts. The test is based on the Object-parameterNames.js
test with some minor changes and the documentation is based on the Object docs.

Devtools code will use this in the next patch.

The callee getter returned |undefined| for certain functions because it's
hard to recover the callee consistently for all environments and we can't
return the canonical function. See also bug 1414684.

This patch fixes that by exposing the script instead of the callee. Devtools is
only interested in the displayName and parameterNames properties and those are
also available on scripts (the previous patch adds Script.parameterNames).

Depends on D89700

Severity: normal → N/A
Priority: -- → P2
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/530e5373b9ac part 1 - Add Debugger.Script.parameterNames getter. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/e6c6a83c4de7 part 2 - Change Debugger.Environment.callee getter to calleeScript getter. r=tcampbell,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: