| Summary: | [WASM-References] Change default value for externref's tables from null to undefined | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Dmitry <dbezhetskov> | ||||||
| Component: | WebAssembly | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Dmitry
2021-01-25 05:56:09 PST
Created attachment 418283 [details]
Patch
Comment on attachment 418283 [details] 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? Created attachment 418416 [details]
Patch
Comment on attachment 418416 [details]
Patch
r=me
Comment on attachment 418416 [details]
Patch
EWS is getting stuck.
Committed r271903: <https://trac.webkit.org/changeset/271903> All reviewed patches have been landed. Closing bug and clearing flags on attachment 418416 [details]. |