⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 118649 in webkit


Ignore:
Timestamp:
May 27, 2012, 10:48:45 PM (14 years ago)
Author:
Darin Adler
Message:

Fix an incorrect assertion in Vector::remove
https://bugs.webkit.org/show_bug.cgi?id=87612

Reviewed by Dan Bernstein.

  • wtf/Vector.h: There's no good reason to disallow calling remove

with a size of 0, even when the position is at the end of the vector,
so changed the two-argument Vector::remove assertion to assert that
the position is <= size rather than < size.

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r118643 r118649  
     12012-05-27  Darin Adler  <darin@apple.com>
     2
     3        Fix an incorrect assertion in Vector::remove
     4        https://bugs.webkit.org/show_bug.cgi?id=87612
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * wtf/Vector.h: There's no good reason to disallow calling remove
     9        with a size of 0, even when the position is at the end of the vector,
     10        so changed the two-argument Vector::remove assertion to assert that
     11        the position is <= size rather than < size.
     12
    1132012-05-27  Yoshifumi Inoue  <yosin@chromium.org>
    214
  • trunk/Source/WTF/wtf/Vector.h

    r111778 r118649  
    11111111    inline void Vector<T, inlineCapacity>::remove(size_t position, size_t length)
    11121112    {
    1113         ASSERT(position < size());
     1113        ASSERT(position <= size());
    11141114        ASSERT(position + length <= size());
    11151115        T* beginSpot = begin() + position;
Note: See TracChangeset for help on using the changeset viewer.