Open Bug 674164 Opened 13 years ago Updated 2 years ago

[jsdbg2] Make onNewScript consistent for cached eval scripts

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect

Tracking

()

People

(Reporter: jorendorff, Unassigned)

References

Details

Attachments

(1 file)

The invariant I want to establish is: if your onNewScript handler walks the getChildScripts tree, and it gets in before any JS code, it will see every single Debugger.Script object you ever find on the stack. Currently I think you get a new Debugger.Script each time a cached eval script is used, but only the first one is delivered to onNewScript. Two possible paths: - use the same Debugger.Script every time for a cached eval script (but this would mean if we cleared out the cache, the Debugger.Script might become dead, or else it would have to keep the JSScript alive) - fire the onNewScript hook each time the cached script is used (but that means multiple Debug.Scripts could have the same child scripts, i.e. the getChildScripts graph is not a collection of trees but a collection of dags)
I think the patches in bug 665167 fix this, but I need to add a test for it. Taking.
Assignee: general → jorendorff
Depends on: 665167
Attached patch testsSplinter Review
Yep. With the patches in bug 665167 applied, these tests pass.

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: jorendorff → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: