Changeset 185909 in webkit


Ignore:
Timestamp:
Jun 24, 2015 7:18:16 AM (9 years ago)
Author:
mark.lam@apple.com
Message:

Fixed assertion in JSStringJoiner::join() (regression from r185899).

Not reviewed.

JSStringJoiner did not account for the case where the array being joined can
have null or undefined elements. As a result, its size may be less than
its initially reserved capacity (which was estimated based on the array length).

  • runtime/JSStringJoiner.cpp:

(JSC::JSStringJoiner::join):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r185904 r185909  
     12015-06-24  Mark Lam  <mark.lam@apple.com>
     2
     3        Fixed assertion in JSStringJoiner::join() (regression from r185899).
     4
     5        Not reviewed.
     6
     7        JSStringJoiner did not account for the case where the array being joined can
     8        have null or undefined elements.  As a result, its size may be less than
     9        its initially reserved capacity (which was estimated based on the array length).
     10
     11        * runtime/JSStringJoiner.cpp:
     12        (JSC::JSStringJoiner::join):
     13
    1142015-06-24  Darin Adler  <darin@apple.com>
    215
  • trunk/Source/JavaScriptCore/runtime/JSStringJoiner.cpp

    r185899 r185909  
    9696JSValue JSStringJoiner::join(ExecState& state)
    9797{
    98     ASSERT(m_strings.size() == m_strings.capacity());
     98    ASSERT(m_strings.size() <= m_strings.capacity());
    9999
    100100    unsigned length = joinedLength(state);
Note: See TracChangeset for help on using the changeset viewer.