[wpt-sync] Sync PR 53719 - [source-phase-imports] Don't clear Data buffer for Wasm Script Resources
Categories
(Core :: JavaScript: WebAssembly, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox142 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 53719 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/53719
Details from upstream follow.
Luis Pardo <lpardosixtos@microsoft.com> wrote:
[source-phase-imports] Don't clear Data buffer for Wasm Script Resources
When a resource is requested as a classic script, the source is decoded
into a ParkableString, cached in the corresponding ScriptResource and
the corresponding Data buffer from the ScriptResource is cleared.
When a Wasm resource is loaded as an ESM module, it is not decoded nor
cached, instead it gets the source bytes from the ScriptResource's Data
buffer without clearing it. As a side-effect Wasm modules always expect
the Data buffer to not be cleared, which could cause issues if the same
resource was first requested as a classic Script.This CL:
- Adds logic to only clear the Data buffer if the mime type is not
application/wasm.- Disabled streaming for scripts with mime type application/wasm
because streamed-scripts directly cache the decoded source text
into the corresponding ScriptResource.Drive-by: Add a WPT test for loading WASM sources that cannot be
encoded as UTF8 strings.Bug: 42204365
Change-Id: I18343d0f079275f32b8cf325a8b1be94d4fe7125
Fixed: 425682456
Reviewed-on: https://chromium-review.googlesource.com/6681088
WPT-Export-Revision: 10446228efe18605c34f5a6084f7990d6b84e5d5
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 1•2 months ago
|
||
Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests
Status Summary
Firefox
TIMEOUT
: 2
ERROR
: 1
Chrome
TIMEOUT
: 2
ERROR
: 1
Safari
TIMEOUT
: 2
ERROR
: 1
Links
Details
New Tests That Don't Pass
- /wasm/webapi/esm-integration/reuse-wasm-loaded-as-classic-script.tentative.html [wpt.fyi]:
TIMEOUT
(Chrome:TIMEOUT
, Safari:TIMEOUT
)- Reuse Wasm loaded as classic script:
TIMEOUT
(Chrome:TIMEOUT
, Safari:TIMEOUT
)
- Reuse Wasm loaded as classic script:
- /wasm/webapi/esm-integration/source-phase-import-non-UTF8.tentative.html [wpt.fyi]:
ERROR
(Chrome:ERROR
, Safari:ERROR
)
Comment 4•1 month ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6f643f5d7e41
https://hg.mozilla.org/mozilla-central/rev/621823c340d7
Description
•