https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc
File src/accessors.cc (right):

https://chromiumcodereview.appspot.com/11338048/diff/10002/src/accessors.cc#newcode108
src/accessors.cc:108: for (uint32_t len = old_length; len > new_length;
--len) {
On 2012/11/08 14:56:28, rossberg wrote:
If you want to avoid the off-by-one nuisance below, I think you could
make this

for (uint32_t len = old_length-1; len+1 > new_length; --len)

Nope: first of all, need to add an if statement now to check that
old_length > 0. And even then, this won't terminate if new_length is 0.
The last time through, len will be 0, so len + 1 is 1. Then on the last
iteration, --len is 2^32.

https://chromiumcodereview.appspot.com/11338048/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to