[Webkit-unassigned] [Bug 183082] New: Can't transfer arraybuffer to service worker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 23 06:52:44 PST 2018


            Bug ID: 183082
           Summary: Can't transfer arraybuffer to service worker
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Service Workers
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Ms2ger at igalia.com

Problem seems to be that MessageWithMessagePorts::{encode,decode} don't handle the transferred array buffers, only the serialization and MessagePorts.

Test case:

<!doctype html>
<script src=/resources/testharness.js>
promise_test(async t => {
  let reg = await navigator.serviceWorker.register("/tmp/sw.js");
  const ab = new ArrayBuffer(8);
  let sw = reg.installing || reg.waiting || reg.active;
  sw.postMessage(ab, [ab]);
  await new Promise((res, rej) => {
    navigator.serviceWorker.onmessage = e => rej(e.data);

self.addEventListener('message', function(event) {

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180223/aa27edaa/attachment-0001.html>

More information about the webkit-unassigned mailing list