Closed Bug 1469350 Opened 6 years ago Closed 6 years ago

Debugger.Frame.onPop should not allow reentering a generator that is already on the stack

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

Attachments

(1 file, 2 obsolete files)

The language spec prevents generators from being re-entered while on stack; Debugger should honor that. At present this is not such a bad bug, but when we start persisting Debugger.Frames across yield, this would put the same Debugger.Frame on the stack in two places, probably causing a cycle in the `frame.older` chain if not worse.
Assignee: nobody → jorendorff
Status: NEW → ASSIGNED
Comment on attachment 8985991 [details] [diff] [review] Debugger.Frame.onPop should not allow reentering a generator that is already on the stack Retracting r? while I track down a bug
Attachment #8985991 - Flags: review?(jimb)
Comment on attachment 8985991 [details] [diff] [review] Debugger.Frame.onPop should not allow reentering a generator that is already on the stack Oh, the failing test was one I wrote for some other changeset, never checked in. So never mind that...
Attachment #8985991 - Flags: review?(jimb)
Attachment #8985991 - Attachment is obsolete: true
Attachment #8985991 - Flags: review?(jimb)
Blocks: 1448880
We prevent it by poking the generator's status field while onPop hooks are running. Async functions get the same treatment, for consistency, although it is apparently impossible to reenter them anyway.
Attachment #8991446 - Flags: review?(jimb)
Attachment #8986064 - Attachment is obsolete: true
Attachment #8986064 - Flags: review?(jimb)
Blocks: 1475417
Attachment #8991446 - Flags: review?(jimb) → review+
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: