Changeset 272081 in webkit
- Timestamp:
- Jan 29, 2021 3:07:25 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/wasm/stress/global-wrong-type.js (added)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.cpp (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r272071 r272081 1 2021-01-29 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Fix WebAssembly.Global's error message and support "funcref" 4 https://bugs.webkit.org/show_bug.cgi?id=221157 5 6 Reviewed by Keith Miller. 7 8 * wasm/stress/global-wrong-type.js: Added. 9 (assert.throws): 10 1 11 2021-01-29 Dmitry Bezhetskov <dbezhetskov@igalia.com> 2 12 -
trunk/LayoutTests/imported/w3c/ChangeLog
r272035 r272081 1 2021-01-29 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Fix WebAssembly.Global's error message and support "funcref" 4 https://bugs.webkit.org/show_bug.cgi?id=221157 5 6 Reviewed by Keith Miller. 7 8 We also update test expect files failing after r272074. 9 10 * web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt: 11 * web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt: 12 1 13 2021-01-28 Martin Robinson <mrobinson@webkit.org> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt
r271774 r272081 8 8 FAIL f64, mutable undefined is not an object (evaluating 'myglobal.type.value') 9 9 FAIL f64, immutable undefined is not an object (evaluating 'myglobal.type.value') 10 FAIL anyref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'11 FAIL anyref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'12 FAIL funcref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'13 FAIL funcref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'10 FAIL anyref, mutable undefined is not an object (evaluating 'myglobal.type.value') 11 FAIL anyref, immutable undefined is not an object (evaluating 'myglobal.type.value') 12 FAIL funcref, mutable undefined is not an object (evaluating 'myglobal.type.value') 13 FAIL funcref, immutable undefined is not an object (evaluating 'myglobal.type.value') 14 14 FAIL key ordering undefined is not an object (evaluating 'Object.getOwnPropertyNames(myglobal.type)') 15 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt
r271774 r272081 8 8 FAIL f64, mutable undefined is not an object (evaluating 'myglobal.type.value') 9 9 FAIL f64, immutable undefined is not an object (evaluating 'myglobal.type.value') 10 FAIL anyref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'11 FAIL anyref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'12 FAIL funcref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'13 FAIL funcref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'10 FAIL anyref, mutable undefined is not an object (evaluating 'myglobal.type.value') 11 FAIL anyref, immutable undefined is not an object (evaluating 'myglobal.type.value') 12 FAIL funcref, mutable undefined is not an object (evaluating 'myglobal.type.value') 13 FAIL funcref, immutable undefined is not an object (evaluating 'myglobal.type.value') 14 14 FAIL key ordering undefined is not an object (evaluating 'Object.getOwnPropertyNames(myglobal.type)') 15 15 -
trunk/Source/JavaScriptCore/ChangeLog
r272074 r272081 1 2021-01-29 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Fix WebAssembly.Global's error message and support "funcref" 4 https://bugs.webkit.org/show_bug.cgi?id=221157 5 6 Reviewed by Keith Miller. 7 8 Since it accepts "anyfunc" and "externref", we should update the error message. 9 And we should support "funcref" too. 10 11 * wasm/js/WebAssemblyGlobalConstructor.cpp: 12 (JSC::JSC_DEFINE_HOST_FUNCTION): 13 * wasm/js/WebAssemblyTableConstructor.cpp: 14 (JSC::JSC_DEFINE_HOST_FUNCTION): 15 1 16 2021-01-29 Dmitry Bezhetskov <dbezhetskov@igalia.com> 2 17 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.cpp
r272071 r272081 87 87 String valueString = valueValue.toWTFString(globalObject); 88 88 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 89 if (valueString == "i32" )89 if (valueString == "i32"_s) 90 90 type = Wasm::Type::I32; 91 else if (valueString == "i64" )91 else if (valueString == "i64"_s) 92 92 type = Wasm::Type::I64; 93 else if (valueString == "f32" )93 else if (valueString == "f32"_s) 94 94 type = Wasm::Type::F32; 95 else if (valueString == "f64" )95 else if (valueString == "f64"_s) 96 96 type = Wasm::Type::F64; 97 else if (Options::useWebAssemblyReferences() && valueString == "anyfunc")97 else if (Options::useWebAssemblyReferences() && (valueString == "anyfunc"_s || valueString == "funcref"_s)) 98 98 type = Wasm::Type::Funcref; 99 else if (Options::useWebAssemblyReferences() && valueString == "externref" )99 else if (Options::useWebAssemblyReferences() && valueString == "externref"_s) 100 100 type = Wasm::Type::Externref; 101 101 else 102 return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64'"_s)));102 return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', 'f64', 'anyfunc', 'funcref', or 'externref'"_s))); 103 103 } 104 104 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp
r272071 r272081 77 77 String elementString = elementValue.toWTFString(globalObject); 78 78 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 79 if (elementString == "funcref" || elementString == "anyfunc")79 if (elementString == "funcref"_s || elementString == "anyfunc"_s) 80 80 type = Wasm::TableElementType::Funcref; 81 else if (elementString == "externref" )81 else if (elementString == "externref"_s) 82 82 type = Wasm::TableElementType::Externref; 83 83 else
Note: See TracChangeset
for help on using the changeset viewer.