[Webkit-unassigned] [Bug 237144] New: SharedArrayBuffer posted to AudioWorkletProcessor is not actually shared with the main thread
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 24 09:54:57 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=237144
Bug ID: 237144
Summary: SharedArrayBuffer posted to AudioWorkletProcessor is
not actually shared with the main thread
Product: WebKit
Version: Safari 15
Hardware: Mac (Intel)
OS: macOS 12
Status: NEW
Severity: Normal
Priority: P2
Component: Web Audio
Assignee: webkit-unassigned at lists.webkit.org
Reporter: tasnimrock2k6 at gmail.com
CC: cdumez at apple.com
Created attachment 453112
--> https://bugs.webkit.org/attachment.cgi?id=453112&action=review
Screenshot of steps in safari
When SharedArrayBuffer is posted to AudioWorkletProcessor from main thread, changing value of an element from main thread should be reflected within AudioWorkletProcessor (which is running in its own Web Audio render thread). This doesn't seem to be happening in Safari but works perfectly fine in Chrome. Moreover, when SharedArrayBuffer is posted to a Worker, the changed value is noticed in Safari and chrome (both).
Minimal steps to reproduce:
In the same directory, need 3 files: safari.html, white-noise-processor.js & server.py (this one is for overriding response headers to enable cross origin isolation). The first two can be found here: https://jsfiddle.net/vzh29gk1/2/ . Copy them in a directory and create server.py there like below:
#!/usr/bin/env python
try:
from http import server # Python 3
except ImportError:
import SimpleHTTPServer as server # Python 2
class MyHTTPRequestHandler(server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_my_headers()
server.SimpleHTTPRequestHandler.end_headers(self)
def send_my_headers(self):
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Cross-Origin-Opener-Policy", "same-origin")
self.send_header("Cross-Origin-Embedder-Policy", "require-corp")
if __name__ == '__main__':
server.test(HandlerClass=MyHTTPRequestHandler)
On terminal, in the same directory which has all 3 above files, type: 'python3 -m server' and then open URL: localhost:8000/safari.html on browser. Keep the Developer Console tab. Now, click anywhere in the screen. This should be enough to kick-off the worklet processor. In the console tab, try tweaking the value of an element of SharedArrayBuffer and notice that its still not changed within AudioWorkletProcessor. Have attached the image on how the steps look like in safari.
--
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/20220224/595e6c63/attachment.htm>
More information about the webkit-unassigned
mailing list