Open Bug 944258 Opened 12 years ago Updated 25 days ago

[jsdbg2] Debugger should provide a GC-insensitive way to list |Debugger.Source|s

Categories

(Core :: JavaScript: Debugger API, defect)

defect

Tracking

()

People

(Reporter: jimb, Unassigned)

References

(Blocks 2 open bugs)

Details

Using Debugger.prototype.findScripts to produce a list of relevant URLs for the debugger to display is dumb, because if the scripts happen to get GC'd before you ask for the list, you get an empty list. But the results randomly depend on GC timing. This is a terrible state of affairs. Pace memshrink, each compartment should retain the full set of URLs for all the sources that have ever been loaded into the compartment; Debugger should have a method that returns the union of all the debuggees' URL sets. Reloading a page creates a fresh compartment, so this shouldn't be too ridiculous. We could cap the set size at something reasonable, like 1000. A thousand 100-character URLs is not even a megabyte.
Blocks: 944261
Don't we actually want |D.Source|s, not URLs or |D.Script|s (like bug 944260)?
Summary: [jsdbg2] Debugger should provide a GC-insensitive way to list relevant source URLs → [jsdbg2] Debugger should provide a GC-insensitive way to list |Debugger.Source|s
I don't think we can retain the full sources by default. The debugger client already knows how to fetch sources from URLs, so it should be able to cope with missing D.S's.
Severity: normal → S3

Moving bugs to Debugger API component. Use castle-terms-potato to filter out.

Component: JavaScript Engine → JavaScript: Debugger API
You need to log in before you can comment on or make changes to this bug.