Closed Bug 449473 Opened 13 years ago Closed 6 years ago

Extend jsdIScript to include the maximum value of the program counter


(Core :: JavaScript Engine, enhancement)

Not set





(Reporter: johnjbarton, Unassigned)



(Whiteboard: [firebug-p2])

Current jdsIScript provides lineExtent referring to source lines and a couple of conversion functions between program counter and source lines. However there does not seem to be any practical way to loop over PC and extract lines because we don't know the upper limit of the PC for a script, but we know experimentally that FF will crash if you exceed that unknown limit (see bug 430205).

This extension could be combined with some others or not. The expanded API should be backward compatible. The implementation is likely to be small. The benefit would be improved performance and capability. Currently Firebug cannot test the lines of an outer script for executablilty because the call isLineExecutable() is too expensive to call for all lines of a long source file. (Nested scripts are not scanned until the user looks at the corresponding source, but outer scripts will be GC by the time the debugger shows the source). By looping over PC, we can get lines and use isLineExecutable() only on those lines (commonly two orders of magnitude fewer).
Severity: normal → enhancement
Component: General → JavaScript Debugging APIs
Product: Firefox → Core
QA Contact: general → jsd
Summary: [jsd] Extend jsdIScript to include the maximum value of the program counter → Extend jsdIScript to include the maximum value of the program counter
Version: unspecified → Trunk
I'm happy to add this if someone can explain to me what all is actually needed here or can point me to some docs on the pc stuff....  I don't know enough about it to follow comment 0, unfortunately.  :(
should this have a [firebug-p#] status in the whiteboard? Calling this a p2 for now so it shows up in triage.
OS: Windows XP → All
Hardware: x86 → All
Whiteboard: [firebug-p2]
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
Both the awkward-to-use JSD1 and the crashy decompiler are gone now. I believe that the requested functionality is already trivial to do with the Debugger API. Please re-open if this is not the case.
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.