Open Bug 1060668 Opened 10 years ago Updated 2 years ago

[jsdbg2] Debugger.prototype.onEnterFrame is overbroad

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: jimb, Unassigned)

References

(Blocks 1 open bug)

Details

The Debugger.prototype.onEnterFrame hook observes many more invocations than we actually want it to. Since D.p.onEnterFrame gets called for *any* new frame pushed, this forces the SpiderMonkey JITs to generate debug prologues for all scripts observed by a Debugger that has an onEnterFrame hook set. But in practice, we usually have a *specific* frame whose calls we want to observe. Instead of the present Debugger.prototype.onEnterFrame, we should have: - Debugger.prototype.onEnterFirstFrame, which fires when we first enter JS with an empty stack (or perhaps when we enter JS with a new Script Entry reason?); and - Debugger.Frame.prototype.onInvoke, which fires when 'this' frame calls another function or calls eval. This would let all the scripts not actually being executed remain unchanged.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.