Chromium Code Reviews
DescriptionFix ScopeInfo::StackSlotIndex to skip over non-locals
Block scoping can cause lexical variables in inner scopes to be allocated
stack slots in their outer declaration scope. Neither of the callers of this
method expected such variables to be returned, so it has been changed to
only search the portion of the stack slots that correspond
to locals. Also renamed the method to match the new behavior.
This method only has two callers, one a DCHECK in scopes.cc and the other
the accessor for Function.arguments. I have been unable to reproduce the
former case (though the old code definitely wasn't correct, from inspection).
For the latter, it's not currently exercisable, given that Function.arguments
does not exist in strict mode and V8 does not yet implement block scoping in
sloppy mode.
BUG=v8:4259
LOG=n
Patch Set 1 #
Messages
Total messages: 6 (2 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||