[Webkit-unassigned] [Bug 184254] New: Regression: MessagePort.postMessage() fails to send transferables

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 2 21:44:35 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=184254

            Bug ID: 184254
           Summary: Regression: MessagePort.postMessage() fails to send
                    transferables
           Product: WebKit
           Version: Safari 11
          Hardware: Macintosh
                OS: macOS 10.13
            Status: NEW
          Severity: Major
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ycabon at esri.com

Test case:

<html>
  <body>
    <script>
        var channel = new MessageChannel();
        channel.port1.addEventListener("message", (event) => {
          console.log("port1: message received");

          // data SHOULD defined and containing an ArrayBuffer named buf
          if (event.data == null) {
            console.error("message data null!");
            return;
          }

          var data = event.data;
          event.target.postMessage({ buf: data.buf }, [data.buf]);
        });

        channel.port2.addEventListener("message", (event) => {
          console.log("port2: message received");
          var data = event.data;
          console.log(data.buf);
        });

        channel.port1.start();
        channel.port2.start();

        var arr = new Float64Array();
        channel.port2.postMessage({ buf: arr.buffer }, [arr.buffer]);
      </script>
  </body>
</html>

Transferring an ArrayBuffer using MessagePort.postMessage() fails in Safari 11.1.
The data in the received event by port1 is null.
This used to work in previous stable Safari release.

-- 
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/20180403/d5ec4985/attachment-0002.html>


More information about the webkit-unassigned mailing list