[Webkit-unassigned] [Bug 259362] New: window.postMessage with OffscreenCanvas is broken with isolated world message listener
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 20 10:42:39 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=259362
Bug ID: 259362
Summary: window.postMessage with OffscreenCanvas is broken with
isolated world message listener
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit API
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ajuma at chromium.org
CC: beidson at apple.com, cdumez at apple.com, ggaren at apple.com,
mattwoodrow at apple.com, michaeldo at chromium.org
Created attachment 467080
--> https://bugs.webkit.org/attachment.cgi?id=467080&action=review
Test app
Using postMessage with an OffscreenCanvas breaks when there is a `message` event listener in an isolated world, even for main-world event listeners.
In practice, this bug causes web-exposed breakage on Chrome for iOS, which injects a `message` event listener into an isolated world as part of implementing browser features.
Steps to reproduce (also see the attached test app):
1) In an isolated world (e.g., WKContentWorld.defaultClientWorld) add a trivial `message` event listener that does anything at all with message.data.
2) In the page world, in an iframe, add a `message` event listener
3) In the page world, in the main frame, using a handle to the iframe's contentWindow, call postMessage with an OffscreenCanvas object.
Expect result:
The iframe's page world event listener successfully receives the message sent in (3).
Actual result:
The iframe's page world event listener receives `null`.
The attached test app demonstrates this bug, using four different message types to better illustrate the expected behavior, showing that postMessage works with Object, ArrayBuffer, and MessagePort, but not with OffscreenCanvas.
Bug 254777 fixed the MessagePort case.
--
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/20230720/1a649e05/attachment.htm>
More information about the webkit-unassigned
mailing list