WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
183082
Can't transfer arraybuffer to service worker
https://bugs.webkit.org/show_bug.cgi?id=183082
Summary
Can't transfer arraybuffer to service worker
Ms2ger (he/him; ⌚ UTC+1/+2)
Reported
2018-02-23 06:52:44 PST
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> </script> <script> 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); }); }) </script> self.addEventListener('message', function(event) { event.source.postMessage(`${event.data}`); })
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-02-23 07:25:44 PST
<
rdar://problem/37825426
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug