WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
219600
Support JS type reflections in WebAssembly JS-API
https://bugs.webkit.org/show_bug.cgi?id=219600
Summary
Support JS type reflections in WebAssembly JS-API
jtallon
Reported
2020-12-07 06:20:48 PST
Support JS type reflections in the JS-API, an overview of the API changes are outlined here:
https://github.com/WebAssembly/js-types/blob/master/proposals/js-types/Overview.md
Attachments
Patch
(6.29 KB, patch)
2020-12-07 07:08 PST
,
jtallon
no flags
Details
Formatted Diff
Diff
Patch
(6.31 KB, patch)
2020-12-09 03:19 PST
,
jtallon
no flags
Details
Formatted Diff
Diff
Patch
(6.38 KB, patch)
2020-12-15 14:24 PST
,
jtallon
no flags
Details
Formatted Diff
Diff
Patch
(8.22 KB, patch)
2020-12-18 00:21 PST
,
jtallon
no flags
Details
Formatted Diff
Diff
Patch
(11.26 KB, patch)
2020-12-18 04:12 PST
,
jtallon
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(11.26 KB, patch)
2020-12-18 06:02 PST
,
jtallon
no flags
Details
Formatted Diff
Diff
Patch
(11.34 KB, patch)
2020-12-21 07:04 PST
,
jtallon
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
jtallon
Comment 1
2020-12-07 07:08:05 PST
Created
attachment 415554
[details]
Patch
Yusuke Suzuki
Comment 2
2020-12-07 23:17:01 PST
Comment on
attachment 415554
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=415554&action=review
Looks good, but put r- since I found bugs, And, can you update the LayoutTests results to make EWS green?
> Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp:74 > + JSValue minSizeValue = memoryDescriptor->get(globalObject, minimum);
We need RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); here since `->get(...)` can throw an error.
> Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:85 > + JSValue minSizeValue = memoryDescriptor->get(globalObject, minimumIdent);
Ditto.
Yusuke Suzuki
Comment 3
2020-12-07 23:17:30 PST
Comment on
attachment 415554
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=415554&action=review
> Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp:77 > + return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Memory specify exactly one of 'initial' or 'minimum'")));
Use `return throwVMTypeError(...)`.
> Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:87 > + return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Table exactly one of 'initial' or 'minimum'")));
Ditto.
jtallon
Comment 4
2020-12-09 03:19:17 PST
Created
attachment 415736
[details]
Patch
Yusuke Suzuki
Comment 5
2020-12-09 11:32:05 PST
Comment on
attachment 415736
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=415736&action=review
Can you update LayoutTests results to make EWS green? Currently, win, mac-wk1, mac-wk2, and mac-debug-wk1 are red.
> Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp:78 > + return throwVMTypeError(globalObject, throwScope, "WebAssembly.Memory specify exactly one of 'initial' or 'minimum'");
Maybe, "'initial' and 'minimum' options are specified at the same time" would be better.
> Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp:88 > + return throwVMTypeError(globalObject, throwScope, "WebAssembly.Table exactly one of 'initial' or 'minimum'");
Ditto.
Radar WebKit Bug Importer
Comment 6
2020-12-14 06:21:15 PST
<
rdar://problem/72295339
>
jtallon
Comment 7
2020-12-15 14:24:52 PST
Created
attachment 416294
[details]
Patch
jtallon
Comment 8
2020-12-15 14:29:16 PST
I've amended the patch to include the improved error message. I took a look at the failing tests and it looks like they're web-platform tests for the .type() method on WebAssembly.Memory, WebAssembly.Table and WebAssembly.Global. Those along with WebAssembly.Function I plan to make in a future pull requests, they should be failing currently on master too as it's currently missing. I was planning to land this in smaller sections (minimum constructor parameter, .type method and then WebAssembly.Function implementation). Thanks for the review!
Yusuke Suzuki
Comment 9
2020-12-15 16:13:58 PST
(In reply to jtallon from
comment #8
)
> I've amended the patch to include the improved error message. I took a look > at the failing tests and it looks like they're web-platform tests for the > .type() method on WebAssembly.Memory, WebAssembly.Table and > WebAssembly.Global. Those along with WebAssembly.Function I plan to make in > a future pull requests, they should be failing currently on master too as > it's currently missing. I was planning to land this in smaller sections > (minimum constructor parameter, .type method and then WebAssembly.Function > implementation). > > Thanks for the review!
In WebKit, we cannot land the patch with failing patch. Can you update the xxx-expected.txt files in LayoutTests to make them green? :)
Yusuke Suzuki
Comment 10
2020-12-15 16:14:15 PST
Comment on
attachment 416294
[details]
Patch Needing rebaseline of LayoutTests expected files.
Yusuke Suzuki
Comment 11
2020-12-15 16:48:50 PST
You can see what LayoutTests are failing. If this failure is due to updated expected.txt files, you can update `LayoutTests/.../test-name-expected.txt` to update the expectation of these tests. Then you can make it green. If the failure is due to the bug of the patch, we need to fix the bug before landing. In this case, it seems that tests are failing because expectation is updated. So please update xxx-expected.txt files to update expectations of these tests.
https://ews-build.s3-us-west-2.amazonaws.com/macOS-Mojave-Release-WK2-Tests-EWS/r416294-24678/results.html
Thanks!
jtallon
Comment 12
2020-12-18 00:21:33 PST
Created
attachment 416502
[details]
Patch
jtallon
Comment 13
2020-12-18 04:12:10 PST
Created
attachment 416508
[details]
Patch
jtallon
Comment 14
2020-12-18 06:02:27 PST
Created
attachment 416510
[details]
Patch
Yusuke Suzuki
Comment 15
2020-12-18 13:46:46 PST
Comment on
attachment 416510
[details]
Patch r=me
EWS
Comment 16
2020-12-18 13:47:14 PST
/Volumes/Data/worker/Commit-Queue/build/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Yusuke Suzuki
Comment 17
2020-12-18 14:41:39 PST
Comment on
attachment 416510
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=416510&action=review
> Source/JavaScriptCore/ChangeLog:5 > +
Please keep `Reviewed by NOBODY (OOPS!).` thing. This will be replaced by commit-queue, and we cannot land it without that. ChangeLog format is, 2020-12-07 Jessica Tallon <
jtallon@igalia.com
> [JSC] Add minimum parameter to the WASM JS-API for Memory & Table.
https://bugs.webkit.org/show_bug.cgi?id=219600
Reviewed by NOBODY (OOPS!). Comments.
> LayoutTests/ChangeLog:5 > +
Please keep `Reviewed by NOBODY (OOPS!).` thing. This will be replaced by commit-queue, and we cannot land it without that.
jtallon
Comment 18
2020-12-21 07:04:25 PST
Created
attachment 416600
[details]
Patch
Yusuke Suzuki
Comment 19
2020-12-21 13:28:07 PST
Comment on
attachment 416600
[details]
Patch r=me
EWS
Comment 20
2020-12-21 13:31:49 PST
Committed
r271039
: <
https://trac.webkit.org/changeset/271039
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 416600
[details]
.
Truitt Savell
Comment 21
2020-12-22 16:03:52 PST
The changes in
r271039
appear to have broken fast/images/webp-as-image.html on Big Sur History:
https://results.webkit.org/?suite=layout-tests&test=fast%2Fimages%2Fwebp-as-image.html
Diff:
https://build.webkit.org/results/Apple-BigSur-Release-WK2-Tests/r271064%20(686)/fast/images/webp-as-image-diffs.html
it looks like this test is failing to load an image
Yusuke Suzuki
Comment 22
2020-12-25 10:23:39 PST
(In reply to Truitt Savell from
comment #21
)
> The changes in
r271039
appear to have broken fast/images/webp-as-image.html > on Big Sur > > History: >
https://results.webkit.org/?suite=layout-tests&test=fast%2Fimages%2Fwebp-as
- > image.html > > Diff: >
https://build.webkit.org/results/Apple-BigSur-Release-WK2-Tests/
>
r271064
%20(686)/fast/images/webp-as-image-diffs.html > > it looks like this test is failing to load an image
Hmmmmmmmmm, this sounds super strange. Literally, this patch only changes WebAssembly part.
Yusuke Suzuki
Comment 23
2020-12-25 10:26:07 PST
(In reply to Yusuke Suzuki from
comment #22
)
> (In reply to Truitt Savell from
comment #21
) > > The changes in
r271039
appear to have broken fast/images/webp-as-image.html > > on Big Sur > > > > History: > >
https://results.webkit.org/?suite=layout-tests&test=fast%2Fimages%2Fwebp-as
- > > image.html > > > > Diff: > >
https://build.webkit.org/results/Apple-BigSur-Release-WK2-Tests/
> >
r271064
%20(686)/fast/images/webp-as-image-diffs.html > > > > it looks like this test is failing to load an image > > Hmmmmmmmmm, this sounds super strange. Literally, this patch only changes > WebAssembly part.
That test is ``` <body> <img src="resources/green-400x400.webp"> </body> ``` And the test failure is because the image is not loaded in the actual result. I don't think this patch is related to this test failure. My guess is library update for webp etc.
Yusuke Suzuki
Comment 24
2020-12-25 10:36:57 PST
(In reply to Yusuke Suzuki from
comment #23
)
> (In reply to Yusuke Suzuki from
comment #22
) > > (In reply to Truitt Savell from
comment #21
) > > > The changes in
r271039
appear to have broken fast/images/webp-as-image.html > > > on Big Sur > > > > > > History: > > >
https://results.webkit.org/?suite=layout-tests&test=fast%2Fimages%2Fwebp-as
- > > > image.html > > > > > > Diff: > > >
https://build.webkit.org/results/Apple-BigSur-Release-WK2-Tests/
> > >
r271064
%20(686)/fast/images/webp-as-image-diffs.html > > > > > > it looks like this test is failing to load an image > > > > Hmmmmmmmmm, this sounds super strange. Literally, this patch only changes > > WebAssembly part. > > That test is > > ``` > <body> > <img src="resources/green-400x400.webp"> > </body> > ``` > > And the test failure is because the image is not loaded in the actual result. > I don't think this patch is related to this test failure. > My guess is library update for webp etc.
Reproduced this failure with
r271038
. So this revision is not related to the failure.
Alexey Proskuryakov
Comment 25
2020-12-28 13:17:00 PST
Right, we had the version of macOS updated right then. This is almost certainly a dupe of
bug 219977
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug