DescriptionAllocate generator result objects before unwinding try handlers
When a generator suspends, it saves its state out to the heap and
unwinds try handlers but doesn't pop anything off the stack. Instead it
relies on no GC happening between the suspend and the return from the
generator. However this was not the case: boxing the result object
could cause GC, which would try to traverse the stack but would
misinterpret words from unwound try handlers as heap objects.
This CL changes to allocate the result objects before the suspend. It
also removes the generators-iteration skip introduced in r15065.
R=mstarzinger@chromium.org
TEST=mjsunit/harmony/generators-iteration
BUG=
Committed: http://code.google.com/p/v8/source/detail?r=15079
Patch Set 1 #
Total comments: 1
Patch Set 2 : Switch fallthrough for yield boxing #
Messages
Total messages: 4 (0 generated)
|