[Webkit-unassigned] [Bug 220918] [WASM-References] Change default value for externref's tables from null to undefined
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 25 12:33:30 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=220918
Yusuke Suzuki <ysuzuki at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ysuzuki at apple.com
Attachment #418283|review?, commit-queue? |review+, commit-queue-
Flags| |
--- Comment #2 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 418283
--> https://bugs.webkit.org/attachment.cgi?id=418283
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=418283&action=review
r=me with comments.
> Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:126
> + : callFrame->argument(1);
Use `uncheckedArgument(1)` since we already checked.
> Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp:99
> + defaultValue = callFrame->argument(1);
Use `callFrame->uncheckedArgument(1);` since we already checked `callFrame->argumentCount() < 2`
> Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp:137
> JSValue value = callFrame->argument(1);
> - if (Options::useWebAssemblyReferences() && value.isUndefined())
> - value = jsNull();
> + if (Options::useWebAssemblyReferences() && callFrame->argumentCount() < 2)
> + value = defaultValueForTable(table->table()->type());
This needs to be done after
if (index >= table->length())
return throwVMRangeError(globalObject, throwScope, "WebAssembly.Table.prototype.set expects an integer less than the length of the table"_s);
part. Can you move it, and add test for this?
--
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/20210125/3f03d01e/attachment-0001.htm>
More information about the webkit-unassigned
mailing list