archives

« Bugzilla Issues Index

#1545 — 15.19.4.3.1: Throw TypeError if [[GeneratorState]] is not undefined


15.19.4.3.1 GeneratorStart currently allows restarting an already started generator object, add an additional step to make this an error.


GeneratorStart is only called by the specification when the generator's [[GeneratorState]] is undefined (meaning never started).

I added an assert to GeneratorStart to clarify that.


I assume "Runtime Semantics EvaluateBody" for "GeneratorBody : FunctionBody" was changed to test that [[GeneratorState]] is undefined, similar to step 3 of "Runtime Semantics EvaluateBody" for "GeneratorBody : Comprehension".


That test should also be unnecessary. But also see Bug 1489 as things are likely to change.


fixed in rev 16 editor's draft


fixed in rev16 draft. July 15, 2013