Changeset 243665 in webkit


Ignore:
Timestamp:
Mar 29, 2019 2:53:54 PM (5 years ago)
Author:
Tadeu Zagallo
Message:

Assertion failed in JSC::createError
https://bugs.webkit.org/show_bug.cgi?id=196305
<rdar://problem/49387382>

Reviewed by Saam Barati.

JSTests:

  • stress/create-error-out-of-memory-rope-string-2.js: Added.

(assert):
(catch):

Source/JavaScriptCore:

JSC::createError assumes that errorDescriptionForValue will either
throw an exception or return a valid description string. However, that
is not true if the value is a rope string and we successfully resolve it,
but later fail to wrap the string in quotes with tryMakeString.

  • runtime/ExceptionHelpers.cpp:

(JSC::createError):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r243639 r243665  
     12019-03-29  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        Assertion failed in JSC::createError
     4        https://bugs.webkit.org/show_bug.cgi?id=196305
     5        <rdar://problem/49387382>
     6
     7        Reviewed by Saam Barati.
     8
     9        * stress/create-error-out-of-memory-rope-string-2.js: Added.
     10        (assert):
     11        (catch):
     12
    1132019-03-28  Saam Barati  <sbarati@apple.com>
    214
  • trunk/Source/JavaScriptCore/ChangeLog

    r243663 r243665  
     12019-03-29  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        Assertion failed in JSC::createError
     4        https://bugs.webkit.org/show_bug.cgi?id=196305
     5        <rdar://problem/49387382>
     6
     7        Reviewed by Saam Barati.
     8
     9        JSC::createError assumes that `errorDescriptionForValue` will either
     10        throw an exception or return a valid description string. However, that
     11        is not true if the value is a rope string and we successfully resolve it,
     12        but later fail to wrap the string in quotes with `tryMakeString`.
     13
     14        * runtime/ExceptionHelpers.cpp:
     15        (JSC::createError):
     16
    1172019-03-29  Devin Rousso  <drousso@apple.com>
    218
  • trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp

    r243335 r243665  
    276276
    277277    String valueDescription = errorDescriptionForValue(exec, value);
    278     ASSERT(scope.exception() || !!valueDescription);
    279     if (!valueDescription) {
     278    if (scope.exception() || !valueDescription) {
    280279        scope.clearException();
    281280        return createOutOfMemoryError(exec);
Note: See TracChangeset for help on using the changeset viewer.