Closed Bug 743351 Opened 12 years ago Closed 12 years ago

[jsdbg2] Debugger.Script should provide a 'staticLevel' accessor

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: jimb, Assigned: jimb)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

For sorting through the various scripts covering a given source location, it can be helpful to know each script's static level --- the number of function bodies it's nested within. To this end, Debugger.Script instances should have a 'staticLevel' accesssor.

Draft documentation here: https://github.com/jimblandy/DebuggerDocs/blob/script-staticLevel/debug-api
Status: NEW → ASSIGNED
This might not have been the most important thing to do today. :( But it's done!
Attachment #613011 - Flags: review?(jorendorff)
Blocks: 743341
Comment on attachment 613011 [details] [diff] [review]
Implement Debugger.Script.prototype.staticLevel.

This is kind of an unattractive concept to add to scripts, but practicality beats purity.
Attachment #613011 - Flags: review?(jorendorff) → review+
Comment on attachment 613011 [details] [diff] [review]
Implement Debugger.Script.prototype.staticLevel.

Oh, one thing:

>+test("evil = eval; eval('evil(\\\'debugger;\\\');');", 0); // I really must disagree.

I don't get the joke.
(In reply to Jason Orendorff [:jorendorff] from comment #4)
> I don't get the joke.

Clarified.
Assignee: jimb → nobody
Component: JavaScript Engine → jemalloc
QA Contact: general → jemalloc
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a6a021e38ca
Assignee: nobody → jimb
Component: jemalloc → JavaScript Engine
QA Contact: jemalloc → general
Flags: in-testsuite+
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/4a6a021e38ca
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.