AbstractGeneratorObject "closing" state is unused

RESOLVED FIXED in Firefox 68

Status

()

task
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: jimb, Assigned: jimb)

Tracking

(Blocks 2 bugs)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

(Whiteboard: [debugger-mvp])

Attachments

(1 attachment)

Nothing in SpiderMonkey distinguishes between an AbstractGeneratorObject in the "running" state versus the "closing" state; its presence is unnecessarily confusing. All code instead throws a JSWhyMagic::JS_GENERATOR_CLOSING value and checks JSContext::isClosingGenerator to manage generators that have been forcibly closed.

The generator 'closing' state, indicated by the value RESUME_INDEX_CLOSING in an
AbstractGeneratorObject's RESUME_INDEX_SLOT is never distinguished from the
'running' state, so RESUME_INDEX_CLOSING, and its associated setters and
predicates, can be removed.

RESUME_INDEX_RUNNING remains as a magic value appearing in the resume index
slot, and is now used as an upper bound on normal resume index values instead of
RESUME_INDEX_CLOSING.

Blocks: 1546727
Pushed by jblandy@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/32a3534e33fd
Remove 'closing' state from AbstractGeneratorObject. r=iain
Assignee: nobody → jimb
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Whiteboard: [debugger-mvp]
You need to log in before you can comment on or make changes to this bug.