Changeset 271115 in webkit
- Timestamp:
- Dec 30, 2020 7:27:12 PM (19 months ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/proto-from-ctor-realm-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/prototypes.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/prototypes.any.worker-expected.txt (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r271113 r271115 1 2020-12-30 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] WebAssembly Table/Memory/Global should allow inheritance 4 https://bugs.webkit.org/show_bug.cgi?id=220207 5 6 Reviewed by Alexey Shvayka. 7 8 * web-platform-tests/wasm/jsapi/proto-from-ctor-realm-expected.txt: 9 * web-platform-tests/wasm/jsapi/prototypes.any-expected.txt: 10 * web-platform-tests/wasm/jsapi/prototypes.any.worker-expected.txt: 11 1 12 2020-12-30 Yusuke Suzuki <ysuzuki@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/proto-from-ctor-realm-expected.txt
r267649 r271115 30 30 PASS WebAssembly.Instance: Proxy of Proxy of cross-realm NewTarget with `-0` prototype 31 31 PASS WebAssembly.Instance: Proxy of bound cross-realm NewTarget with `NaN` prototype 32 FAIL WebAssembly.Memory: cross-realm NewTarget with `undefined` prototype assert_true: expected true got false33 FAIL WebAssembly.Memory: cross-realm NewTarget with `null` prototype assert_true: expected true got false34 FAIL WebAssembly.Memory: cross-realm NewTarget with `false` prototype assert_true: expected true got false35 FAIL WebAssembly.Memory: cross-realm NewTarget with `true` prototype assert_true: expected true got false36 FAIL WebAssembly.Memory: cross-realm NewTarget with `0` prototype assert_true: expected true got false37 FAIL WebAssembly.Memory: cross-realm NewTarget with `-1` prototype assert_true: expected true got false38 FAIL WebAssembly.Memory: cross-realm NewTarget with `""` prototype assert_true: expected true got false39 FAIL WebAssembly.Memory: cross-realm NewTarget with `"str"` prototype assert_true: expected true got false40 FAIL WebAssembly.Memory: cross-realm NewTarget with `symbol "Symbol()"` prototype assert_true: expected true got false41 FAIL WebAssembly.Memory: bound cross-realm NewTarget with `undefined` prototype assert_true: expected true got false42 FAIL WebAssembly.Memory: bound bound cross-realm NewTarget with `null` prototype assert_true: expected true got false43 FAIL WebAssembly.Memory: bound Proxy of cross-realm NewTarget with `false` prototype assert_true: expected true got false44 FAIL WebAssembly.Memory: Proxy of cross-realm NewTarget with `true` prototype assert_true: expected true got false45 FAIL WebAssembly.Memory: Proxy of Proxy of cross-realm NewTarget with `-0` prototype assert_true: expected true got false46 FAIL WebAssembly.Memory: Proxy of bound cross-realm NewTarget with `NaN` prototype assert_true: expected true got false47 FAIL WebAssembly.Table: cross-realm NewTarget with `undefined` prototype assert_true: expected true got false48 FAIL WebAssembly.Table: cross-realm NewTarget with `null` prototype assert_true: expected true got false49 FAIL WebAssembly.Table: cross-realm NewTarget with `false` prototype assert_true: expected true got false50 FAIL WebAssembly.Table: cross-realm NewTarget with `true` prototype assert_true: expected true got false51 FAIL WebAssembly.Table: cross-realm NewTarget with `0` prototype assert_true: expected true got false52 FAIL WebAssembly.Table: cross-realm NewTarget with `-1` prototype assert_true: expected true got false53 FAIL WebAssembly.Table: cross-realm NewTarget with `""` prototype assert_true: expected true got false54 FAIL WebAssembly.Table: cross-realm NewTarget with `"str"` prototype assert_true: expected true got false55 FAIL WebAssembly.Table: cross-realm NewTarget with `symbol "Symbol()"` prototype assert_true: expected true got false56 FAIL WebAssembly.Table: bound cross-realm NewTarget with `undefined` prototype assert_true: expected true got false57 FAIL WebAssembly.Table: bound bound cross-realm NewTarget with `null` prototype assert_true: expected true got false58 FAIL WebAssembly.Table: bound Proxy of cross-realm NewTarget with `false` prototype assert_true: expected true got false59 FAIL WebAssembly.Table: Proxy of cross-realm NewTarget with `true` prototype assert_true: expected true got false60 FAIL WebAssembly.Table: Proxy of Proxy of cross-realm NewTarget with `-0` prototype assert_true: expected true got false61 FAIL WebAssembly.Table: Proxy of bound cross-realm NewTarget with `NaN` prototype assert_true: expected true got false62 FAIL WebAssembly.Global: cross-realm NewTarget with `undefined` prototype assert_true: expected true got false63 FAIL WebAssembly.Global: cross-realm NewTarget with `null` prototype assert_true: expected true got false64 FAIL WebAssembly.Global: cross-realm NewTarget with `false` prototype assert_true: expected true got false65 FAIL WebAssembly.Global: cross-realm NewTarget with `true` prototype assert_true: expected true got false66 FAIL WebAssembly.Global: cross-realm NewTarget with `0` prototype assert_true: expected true got false67 FAIL WebAssembly.Global: cross-realm NewTarget with `-1` prototype assert_true: expected true got false68 FAIL WebAssembly.Global: cross-realm NewTarget with `""` prototype assert_true: expected true got false69 FAIL WebAssembly.Global: cross-realm NewTarget with `"str"` prototype assert_true: expected true got false70 FAIL WebAssembly.Global: cross-realm NewTarget with `symbol "Symbol()"` prototype assert_true: expected true got false71 FAIL WebAssembly.Global: bound cross-realm NewTarget with `undefined` prototype assert_true: expected true got false72 FAIL WebAssembly.Global: bound bound cross-realm NewTarget with `null` prototype assert_true: expected true got false73 FAIL WebAssembly.Global: bound Proxy of cross-realm NewTarget with `false` prototype assert_true: expected true got false74 FAIL WebAssembly.Global: Proxy of cross-realm NewTarget with `true` prototype assert_true: expected true got false75 FAIL WebAssembly.Global: Proxy of Proxy of cross-realm NewTarget with `-0` prototype assert_true: expected true got false76 FAIL WebAssembly.Global: Proxy of bound cross-realm NewTarget with `NaN` prototype assert_true: expected true got false32 PASS WebAssembly.Memory: cross-realm NewTarget with `undefined` prototype 33 PASS WebAssembly.Memory: cross-realm NewTarget with `null` prototype 34 PASS WebAssembly.Memory: cross-realm NewTarget with `false` prototype 35 PASS WebAssembly.Memory: cross-realm NewTarget with `true` prototype 36 PASS WebAssembly.Memory: cross-realm NewTarget with `0` prototype 37 PASS WebAssembly.Memory: cross-realm NewTarget with `-1` prototype 38 PASS WebAssembly.Memory: cross-realm NewTarget with `""` prototype 39 PASS WebAssembly.Memory: cross-realm NewTarget with `"str"` prototype 40 PASS WebAssembly.Memory: cross-realm NewTarget with `symbol "Symbol()"` prototype 41 PASS WebAssembly.Memory: bound cross-realm NewTarget with `undefined` prototype 42 PASS WebAssembly.Memory: bound bound cross-realm NewTarget with `null` prototype 43 PASS WebAssembly.Memory: bound Proxy of cross-realm NewTarget with `false` prototype 44 PASS WebAssembly.Memory: Proxy of cross-realm NewTarget with `true` prototype 45 PASS WebAssembly.Memory: Proxy of Proxy of cross-realm NewTarget with `-0` prototype 46 PASS WebAssembly.Memory: Proxy of bound cross-realm NewTarget with `NaN` prototype 47 PASS WebAssembly.Table: cross-realm NewTarget with `undefined` prototype 48 PASS WebAssembly.Table: cross-realm NewTarget with `null` prototype 49 PASS WebAssembly.Table: cross-realm NewTarget with `false` prototype 50 PASS WebAssembly.Table: cross-realm NewTarget with `true` prototype 51 PASS WebAssembly.Table: cross-realm NewTarget with `0` prototype 52 PASS WebAssembly.Table: cross-realm NewTarget with `-1` prototype 53 PASS WebAssembly.Table: cross-realm NewTarget with `""` prototype 54 PASS WebAssembly.Table: cross-realm NewTarget with `"str"` prototype 55 PASS WebAssembly.Table: cross-realm NewTarget with `symbol "Symbol()"` prototype 56 PASS WebAssembly.Table: bound cross-realm NewTarget with `undefined` prototype 57 PASS WebAssembly.Table: bound bound cross-realm NewTarget with `null` prototype 58 PASS WebAssembly.Table: bound Proxy of cross-realm NewTarget with `false` prototype 59 PASS WebAssembly.Table: Proxy of cross-realm NewTarget with `true` prototype 60 PASS WebAssembly.Table: Proxy of Proxy of cross-realm NewTarget with `-0` prototype 61 PASS WebAssembly.Table: Proxy of bound cross-realm NewTarget with `NaN` prototype 62 PASS WebAssembly.Global: cross-realm NewTarget with `undefined` prototype 63 PASS WebAssembly.Global: cross-realm NewTarget with `null` prototype 64 PASS WebAssembly.Global: cross-realm NewTarget with `false` prototype 65 PASS WebAssembly.Global: cross-realm NewTarget with `true` prototype 66 PASS WebAssembly.Global: cross-realm NewTarget with `0` prototype 67 PASS WebAssembly.Global: cross-realm NewTarget with `-1` prototype 68 PASS WebAssembly.Global: cross-realm NewTarget with `""` prototype 69 PASS WebAssembly.Global: cross-realm NewTarget with `"str"` prototype 70 PASS WebAssembly.Global: cross-realm NewTarget with `symbol "Symbol()"` prototype 71 PASS WebAssembly.Global: bound cross-realm NewTarget with `undefined` prototype 72 PASS WebAssembly.Global: bound bound cross-realm NewTarget with `null` prototype 73 PASS WebAssembly.Global: bound Proxy of cross-realm NewTarget with `false` prototype 74 PASS WebAssembly.Global: Proxy of cross-realm NewTarget with `true` prototype 75 PASS WebAssembly.Global: Proxy of Proxy of cross-realm NewTarget with `-0` prototype 76 PASS WebAssembly.Global: Proxy of bound cross-realm NewTarget with `NaN` prototype 77 77 PASS WebAssembly.CompileError: cross-realm NewTarget with `undefined` prototype 78 78 PASS WebAssembly.CompileError: cross-realm NewTarget with `null` prototype -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/prototypes.any-expected.txt
r269866 r271115 2 2 PASS _Module 3 3 PASS _Instance 4 FAIL _Memory assert_true: _Memory instanceof _Memory expected true got false 5 FAIL _Table assert_true: _Table instanceof _Table expected true got false6 FAIL _Global assert_true: _Global instanceof _Global expected true got false 4 PASS _Memory 5 PASS _Table 6 PASS _Global 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/prototypes.any.worker-expected.txt
r269866 r271115 2 2 PASS _Module 3 3 PASS _Instance 4 FAIL _Memory assert_true: _Memory instanceof _Memory expected true got false 5 FAIL _Table assert_true: _Table instanceof _Table expected true got false6 FAIL _Global assert_true: _Global instanceof _Global expected true got false 4 PASS _Memory 5 PASS _Table 6 PASS _Global 7 7 -
trunk/Source/JavaScriptCore/ChangeLog
r271114 r271115 1 2020-12-30 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] WebAssembly Table/Memory/Global should allow inheritance 4 https://bugs.webkit.org/show_bug.cgi?id=220207 5 6 Reviewed by Alexey Shvayka. 7 8 WebAssembly.{Table,Memory,Global} should accept inheritance by JS class syntax. 9 We need to create structure from new.target value. 10 11 * wasm/js/WebAssemblyGlobalConstructor.cpp: 12 (JSC::JSC_DEFINE_HOST_FUNCTION): 13 * wasm/js/WebAssemblyMemoryConstructor.cpp: 14 (JSC::JSC_DEFINE_HOST_FUNCTION): 15 * wasm/js/WebAssemblyTableConstructor.cpp: 16 (JSC::JSC_DEFINE_HOST_FUNCTION): 17 1 18 2020-12-30 Yusuke Suzuki <ysuzuki@apple.com> 2 19 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.cpp
r267594 r271115 51 51 VM& vm = globalObject->vm(); 52 52 auto throwScope = DECLARE_THROW_SCOPE(vm); 53 54 JSObject* newTarget = asObject(callFrame->newTarget()); 55 Structure* webAssemblyGlobalStructure = newTarget == callFrame->jsCallee() 56 ? globalObject->webAssemblyGlobalStructure() 57 : InternalFunction::createSubclassStructure(globalObject, newTarget, getFunctionRealm(vm, newTarget)->webAssemblyGlobalStructure()); 58 RETURN_IF_EXCEPTION(throwScope, { }); 53 59 54 60 JSObject* globalDescriptor; … … 123 129 124 130 Ref<Wasm::Global> wasmGlobal = Wasm::Global::create(type, mutability, initialValue); 125 RELEASE_AND_RETURN(throwScope, JSValue::encode(JSWebAssemblyGlobal::tryCreate(globalObject, vm, globalObject->webAssemblyGlobalStructure(), WTFMove(wasmGlobal))));131 RELEASE_AND_RETURN(throwScope, JSValue::encode(JSWebAssemblyGlobal::tryCreate(globalObject, vm, webAssemblyGlobalStructure, WTFMove(wasmGlobal)))); 126 132 } 127 133 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp
r271039 r271115 57 57 VM& vm = globalObject->vm(); 58 58 auto throwScope = DECLARE_THROW_SCOPE(vm); 59 60 JSObject* newTarget = asObject(callFrame->newTarget()); 61 Structure* webAssemblyMemoryStructure = newTarget == callFrame->jsCallee() 62 ? globalObject->webAssemblyMemoryStructure() 63 : InternalFunction::createSubclassStructure(globalObject, newTarget, getFunctionRealm(vm, newTarget)->webAssemblyMemoryStructure()); 64 RETURN_IF_EXCEPTION(throwScope, { }); 59 65 60 66 JSObject* memoryDescriptor; … … 124 130 } 125 131 126 auto* jsMemory = JSWebAssemblyMemory::tryCreate(globalObject, vm, globalObject->webAssemblyMemoryStructure());132 auto* jsMemory = JSWebAssemblyMemory::tryCreate(globalObject, vm, webAssemblyMemoryStructure); 127 133 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 128 134 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp
r271039 r271115 55 55 VM& vm = globalObject->vm(); 56 56 auto throwScope = DECLARE_THROW_SCOPE(vm); 57 58 JSObject* newTarget = asObject(callFrame->newTarget()); 59 Structure* webAssemblyTableStructure = newTarget == callFrame->jsCallee() 60 ? globalObject->webAssemblyTableStructure() 61 : InternalFunction::createSubclassStructure(globalObject, newTarget, getFunctionRealm(vm, newTarget)->webAssemblyTableStructure()); 62 RETURN_IF_EXCEPTION(throwScope, { }); 57 63 58 64 JSObject* memoryDescriptor; … … 116 122 } 117 123 118 RELEASE_AND_RETURN(throwScope, JSValue::encode(JSWebAssemblyTable::tryCreate(globalObject, vm, globalObject->webAssemblyTableStructure(), wasmTable.releaseNonNull())));124 RELEASE_AND_RETURN(throwScope, JSValue::encode(JSWebAssemblyTable::tryCreate(globalObject, vm, webAssemblyTableStructure, wasmTable.releaseNonNull()))); 119 125 } 120 126
Note: See TracChangeset
for help on using the changeset viewer.