Closed Bug 1680047 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 26698 - Correctly handle detach during (de)compression

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox85 fixed)

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 26698 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/26698
Details from upstream follow.

b'Adam Rice <ricea@chromium.org>' wrote:

Correctly handle detach during (de)compression

Sometimes CompressionStream and DecompressionStream enqueue multiple
output chunks for a single input chunk. When this happens, JavaScript
code can detach the input ArrayBuffer while the stream is processing it.
This will cause an error when zlib tries to read the buffer again
afterwards.

To prevent this, make a copy of the original data when we discover we
will need multiple calls to Enqueue().

Bug: 1151298
Change-Id: I03fca26fc641d54b09067e3994b76ee8efca6839
Reviewed-on: https://chromium-review.googlesource.com/2567539
WPT-Export-Revision: e0b36c9d3fbd5ee52c9be7ec30c04800dd0e0903

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 8 tests and 1 subtests

Status Summary

Firefox

OK : 8
FAIL : 8

Chrome

OK : 8
PASS : 8

Safari

OK : 6
FAIL : 6
ERROR: 2

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/compression/compression-with-detach.tentative.any.html
data should be correctly compressed even if input is detached partway: FAIL (Chrome: PASS, Safari: FAIL)
/compression/compression-with-detach.tentative.any.serviceworker.html
data should be correctly compressed even if input is detached partway: FAIL (Chrome: PASS, Safari: FAIL)
/compression/compression-with-detach.tentative.any.worker.html
data should be correctly compressed even if input is detached partway: FAIL (Chrome: PASS, Safari: FAIL)
/compression/compression-with-detach.tentative.any.sharedworker.html
data should be correctly compressed even if input is detached partway: FAIL (Chrome: PASS)
/compression/decompression-with-detach.tentative.any.serviceworker.html
data should be correctly decompressed even if input is detached partway: FAIL (Chrome: PASS, Safari: FAIL)
/compression/decompression-with-detach.tentative.any.sharedworker.html
data should be correctly decompressed even if input is detached partway: FAIL (Chrome: PASS)
/compression/decompression-with-detach.tentative.any.html
data should be correctly decompressed even if input is detached partway: FAIL (Chrome: PASS, Safari: FAIL)
/compression/decompression-with-detach.tentative.any.worker.html
data should be correctly decompressed even if input is detached partway: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7ee118405929
[wpt PR 26698] - Correctly handle detach during (de)compression, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.