Last Comment Bug 743351 - [jsdbg2] Debugger.Script should provide a 'staticLevel' accessor
: [jsdbg2] Debugger.Script should provide a 'staticLevel' accessor
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: Jim Blandy :jimb
:
:
Mentors:
Depends on:
Blocks: 743341
  Show dependency treegraph
 
Reported: 2012-04-06 14:29 PDT by Jim Blandy :jimb
Modified: 2012-04-14 06:41 PDT (History)
3 users (show)
jimb: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Implement Debugger.Script.prototype.staticLevel. (3.79 KB, patch)
2012-04-06 15:48 PDT, Jim Blandy :jimb
jorendorff: review+
Details | Diff | Splinter Review

Description Jim Blandy :jimb 2012-04-06 14:29:43 PDT
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
Comment 1 Jim Blandy :jimb 2012-04-06 15:48:16 PDT
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!
Comment 2 Jim Blandy :jimb 2012-04-06 15:57:27 PDT
Try: https://tbpl.mozilla.org/?tree=Try&rev=b7cb30f40226
Comment 3 Jason Orendorff [:jorendorff] 2012-04-09 15:31:12 PDT
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.
Comment 4 Jason Orendorff [:jorendorff] 2012-04-09 15:32:44 PDT
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.
Comment 5 Jim Blandy :jimb 2012-04-13 13:23:27 PDT
(In reply to Jason Orendorff [:jorendorff] from comment #4)
> I don't get the joke.

Clarified.
Comment 7 :Ms2ger (⌚ UTC+1/+2) 2012-04-14 06:41:51 PDT
https://hg.mozilla.org/mozilla-central/rev/4a6a021e38ca

Note You need to log in before you can comment on or make changes to this bug.