[Webkit-unassigned] [Bug 220323] [WASM-References] Add optional default value parameter for Table.grow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 6 12:36:58 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=220323

Yusuke Suzuki <ysuzuki at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #417077|review?                     |review+
              Flags|                            |

--- Comment #5 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 417077
  --> https://bugs.webkit.org/attachment.cgi?id=417077
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=417077&action=review

r=me with EWS fix. LayoutTest contain reference-types tests for Tables. expect files need to be rebaselined.

> Source/JavaScriptCore/ChangeLog:3
> +        [WASM-References] Add optional default value parameter for Table.grow

Let's change the title since this patch includes constructor and Table#set support too.

> Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:124
> +    JSValue jsWebAssemblyTableValue = JSWebAssemblyTable::tryCreate(globalObject, vm, webAssemblyTableStructure, wasmTable.releaseNonNull());

Let's just receive it as `JSWebAssemblyTable* jsWebAssemblyTableValue = ...`.

> Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:129
> +        JSWebAssemblyTable* table = jsDynamicCast<JSWebAssemblyTable*>(vm, jsWebAssemblyTableValue);

Remove this line.

> Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp:98
> +        return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Table.prototype.grow expects the second argument to be null or an instance of WebAssembly.Function"_s)));

Use `throwVMTypeError` instead.

> Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp:101
> +    if (!table->grow(delta, defaultValue))

Let's change the old code with throwVMTypeError.

> JSTests/ChangeLog:3
> +        [WASM-References] Add optional default value parameter for Table.grow

Ditto.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210106/32664aae/attachment.htm>


More information about the webkit-unassigned mailing list