Changeset 46147 in webkit for trunk/JavaScriptCore/wtf/Vector.h


Ignore:
Timestamp:
Jul 20, 2009, 7:58:41 PM (16 years ago)
Author:
[email protected]
Message:

2009-07-20 Jessie Berlin <[email protected]>

Fix an incorrect assertion in Vector::remove.


Reviewed by David Levin.


https://bugs.webkit.org/show_bug.cgi?id=27477

  • wtf/Vector.h: (WTF::::remove): Assert that the position at which to start removing elements + the length (the number of elements to remove) is less than or equal to the size of the entire Vector.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Vector.h

    r45891 r46147  
    935935    {
    936936        ASSERT(position < size());
    937         ASSERT(position + length < size());
     937        ASSERT(position + length <= size());
    938938        T* beginSpot = begin() + position;
    939939        T* endSpot = beginSpot + length;
Note: See TracChangeset for help on using the changeset viewer.