Assertion failed in JSC::createError
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Mar 2019 21:53:54 +0000 (21:53 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Mar 2019 21:53:54 +0000 (21:53 +0000)
commit557875cdc44a02c4d2c98e21e04d478887aef952
tree9ce9ff2fffe395d649aced1022f2392426da8441
parent5b35e714bb4b2ccb754399dba0dc0f20ae15c502
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/create-error-out-of-memory-rope-string-2.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ExceptionHelpers.cpp