Changeset 233217 in webkit


Ignore:
Timestamp:
Jun 26, 2018 1:37:30 PM (6 years ago)
Author:
mark.lam@apple.com
Message:

ASSERTION FAILED: length > butterfly->vectorLength() in JSObject::ensureLengthSlow().
https://bugs.webkit.org/show_bug.cgi?id=187060
<rdar://problem/41452767>

Reviewed by Keith Miller.

JSTests:

  • stress/regress-187060.js: Added.

Source/JavaScriptCore:

JSObject::ensureLengthSlow() may be called only because it needs to do a copy on
write conversion. Hence, we can return early after the conversion if the vector
length is already sufficient to cover the requested length.

  • runtime/JSObject.cpp:

(JSC::JSObject::ensureLengthSlow):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r233167 r233217  
     12018-06-26  Mark Lam  <mark.lam@apple.com>
     2
     3        ASSERTION FAILED: length > butterfly->vectorLength() in JSObject::ensureLengthSlow().
     4        https://bugs.webkit.org/show_bug.cgi?id=187060
     5        <rdar://problem/41452767>
     6
     7        Reviewed by Keith Miller.
     8
     9        * stress/regress-187060.js: Added.
     10
    1112018-06-25  Mark Lam  <mark.lam@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r233213 r233217  
     12018-06-26  Mark Lam  <mark.lam@apple.com>
     2
     3        ASSERTION FAILED: length > butterfly->vectorLength() in JSObject::ensureLengthSlow().
     4        https://bugs.webkit.org/show_bug.cgi?id=187060
     5        <rdar://problem/41452767>
     6
     7        Reviewed by Keith Miller.
     8
     9        JSObject::ensureLengthSlow() may be called only because it needs to do a copy on
     10        write conversion.  Hence, we can return early after the conversion if the vector
     11        length is already sufficient to cover the requested length.
     12
     13        * runtime/JSObject.cpp:
     14        (JSC::JSObject::ensureLengthSlow):
     15
    1162018-06-26  Commit Queue  <commit-queue@webkit.org>
    217
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r233122 r233217  
    32633263bool JSObject::ensureLengthSlow(VM& vm, unsigned length)
    32643264{
    3265     if (isCopyOnWrite(indexingMode()))
     3265    if (isCopyOnWrite(indexingMode())) {
    32663266        convertFromCopyOnWrite(vm);
     3267        if (m_butterfly->vectorLength() >= length)
     3268            return true;
     3269    }
    32673270
    32683271    Butterfly* butterfly = this->butterfly();
Note: See TracChangeset for help on using the changeset viewer.