WebKit Bugzilla
Attachment 348616 Details for
Bug 189185
: Fix exception check accounting in constructJSWebAssemblyCompileError().
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch.
bug-189185.patch (text/plain), 3.54 KB, created by
Mark Lam
on 2018-08-31 00:15:19 PDT
(
hide
)
Description:
proposed patch.
Filename:
MIME Type:
Creator:
Mark Lam
Created:
2018-08-31 00:15:19 PDT
Size:
3.54 KB
patch
obsolete
>Index: JSTests/ChangeLog >=================================================================== >--- JSTests/ChangeLog (revision 235537) >+++ JSTests/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-08-31 Mark Lam <mark.lam@apple.com> >+ >+ Fix exception check accounting in constructJSWebAssemblyCompileError(). >+ https://bugs.webkit.org/show_bug.cgi?id=189185 >+ <rdar://problem/39786007> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * stress/regress-189185.js: Added. >+ (new.WebAssembly.CompileError.valueOf): >+ > 2018-08-30 Saam barati <sbarati@apple.com> > > CSE DataViewGet* DFG nodes >Index: JSTests/stress/regress-189185.js >=================================================================== >--- JSTests/stress/regress-189185.js (nonexistent) >+++ JSTests/stress/regress-189185.js (working copy) >@@ -0,0 +1,7 @@ >+//@ runDefault >+// This passes if it does not crash. >+new WebAssembly.CompileError({ >+ valueOf() { >+ throw new Error(); >+ } >+}); >Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 235491) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2018-08-31 Mark Lam <mark.lam@apple.com> >+ >+ Fix exception check accounting in constructJSWebAssemblyCompileError(). >+ https://bugs.webkit.org/show_bug.cgi?id=189185 >+ <rdar://problem/39786007> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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): >+ > 2018-08-29 Mark Lam <mark.lam@apple.com> > > Add some missing exception checks in JSRopeString::resolveRopeToAtomicString(). >Index: Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp >=================================================================== >--- Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp (revision 235490) >+++ Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp (working copy) >@@ -48,7 +48,9 @@ JSWebAssemblyModule* JSWebAssemblyModule > { > auto scope = DECLARE_THROW_SCOPE(vm); > if (!result.has_value()) { >- throwException(exec, scope, JSWebAssemblyCompileError::create(exec, vm, structure->globalObject()->WebAssemblyCompileErrorStructure(), result.error())); >+ auto* error = JSWebAssemblyCompileError::create(exec, vm, structure->globalObject()->WebAssemblyCompileErrorStructure(), result.error()); >+ RETURN_IF_EXCEPTION(scope, nullptr); >+ throwException(exec, scope, error); > return nullptr; > } > >Index: Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp >=================================================================== >--- Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp (revision 235490) >+++ Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp (working copy) >@@ -51,6 +51,7 @@ static EncodedJSValue JSC_HOST_CALL cons > JSValue message = exec->argument(0); > auto* structure = InternalFunction::createSubclassStructure(exec, exec->newTarget(), jsCast<InternalFunction*>(exec->jsCallee())->globalObject(vm)->WebAssemblyCompileErrorStructure()); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >+ scope.release(); > return JSValue::encode(JSWebAssemblyCompileError::create(exec, vm, structure, message)); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189185
: 348616 |
348827