JSC::createError should clear exception thrown by errorDescriptionForValue
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 22:04:56 +0000 (22:04 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 22:04:56 +0000 (22:04 +0000)
commit0f398344027bde0c08ddb71849a1741128bfb80d
treea798750a99a5c4fdc820c72ed09e32b6e2f52b5e
parent299a19e305cf4e467484ca0bcae626994b1cab52
JSC::createError should clear exception thrown by errorDescriptionForValue
https://bugs.webkit.org/show_bug.cgi?id=196089

Reviewed by Mark Lam.

errorDescriptionForValue returns a nullString in case of failure, but it
might also throw an OOM exception when resolving a rope string. We need
to clear any potential exceptions thrown by errorDescriptionForValue
before returning the OOM from JSC::createError.

* runtime/ExceptionHelpers.cpp:
(JSC::createError):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ExceptionHelpers.cpp