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

RESOLVED FIXED in mozilla14

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jimb, Assigned: jimb)

Tracking

(Blocks: 1 bug)

Trunk
mozilla14
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

5 years ago
Created attachment 613011 [details] [diff] [review]
Implement Debugger.Script.prototype.staticLevel.

This might not have been the most important thing to do today. :( But it's done!
Attachment #613011 - Flags: review?(jorendorff)
(Assignee)

Updated

5 years ago
Blocks: 743341
(Assignee)

Comment 2

5 years ago
Try: https://tbpl.mozilla.org/?tree=Try&rev=b7cb30f40226
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.
(Assignee)

Comment 5

5 years ago
(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
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a6a021e38ca
Assignee: nobody → jimb
Component: jemalloc → JavaScript Engine
QA Contact: jemalloc → general
(Assignee)

Updated

5 years ago
Flags: in-testsuite+
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/4a6a021e38ca
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.