Fetch: Handle ArrayBuffer detach during ReadableStream reading.
Previously ReadableStreamByteConsumer assumed that each UInt8Array data chunk was immutable. While its generally true a UInt8Array is immutable it can still be invalidated by transferring it via postMessage(). This will cause any references to the chunk to suddenly become length zero. If this happens to chunks being processed by the consumer then it will get confused and cause a renderer crash. This CL causes the consumer to error out instead. Bug: 1161236 Change-Id: I44c7ad9115b05e321ba7cacaf28863f88ab14492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615675Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Ben Kelly <wanderview@chromium.org> Cr-Commit-Position: refs/heads/master@{#843005}
Showing
Please register or sign in to comment