Fix exception check accounting in constructJSWebAssemblyCompileError().
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2018 17:12:32 +0000 (17:12 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2018 17:12:32 +0000 (17:12 +0000)
commit379d8428825f808cb3605daa2d807a790ab11d52
treecd8eceed8e33f98e5b39f7398b29a298d95ccc45
parenta93ad93f33175ed05b974ae52662723cceefada6
Fix exception check accounting in constructJSWebAssemblyCompileError().
https://bugs.webkit.org/show_bug.cgi?id=189185
<rdar://problem/39786007>

Reviewed by Michael Saboff.

JSTests:

* stress/regress-189185.js: Added.
(new.WebAssembly.CompileError.valueOf):

Source/JavaScriptCore:

Also add an exception check in JSWebAssemblyModule::createStub() so that we don't
inadvertently overwrite a pre-existing exception (if present).

* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::createStub):
* wasm/js/WebAssemblyCompileErrorConstructor.cpp:
(JSC::constructJSWebAssemblyCompileError):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/regress-189185.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp