Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 84cde5ed5a90807649684eb2ebdfee75c6af4a45
https://github.com/WebKit/WebKit/commit/84cde5ed5a90807649684eb2ebdfee75c6af4a45
Author: Brady Eidson <[email protected]>
Date: 2026-06-16 (Tue, 16 Jun 2026)
Changed paths:
A LayoutTests/http/tests/broadcastchannel/.htaccess
A LayoutTests/http/tests/broadcastchannel/postmessage-array-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-array.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-arraybuffer-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-arraybuffer.html
A LayoutTests/http/tests/broadcastchannel/postmessage-audiodata-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-audiodata.html
A LayoutTests/http/tests/broadcastchannel/postmessage-blob-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-blob.html
A LayoutTests/http/tests/broadcastchannel/postmessage-boolean-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-boolean.html
A LayoutTests/http/tests/broadcastchannel/postmessage-date-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-date.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-domexception-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-domexception.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-encodedaudiochunk-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-encodedaudiochunk.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-encodedvideochunk-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-encodedvideochunk.html
A LayoutTests/http/tests/broadcastchannel/postmessage-error-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-error.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-imagebitmap-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-imagebitmap.html
A LayoutTests/http/tests/broadcastchannel/postmessage-imagedata-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-imagedata.html
A LayoutTests/http/tests/broadcastchannel/postmessage-map-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-map.html
A LayoutTests/http/tests/broadcastchannel/postmessage-null-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-null.html
A LayoutTests/http/tests/broadcastchannel/postmessage-number-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-number.html
A LayoutTests/http/tests/broadcastchannel/postmessage-object-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-object.html
A LayoutTests/http/tests/broadcastchannel/postmessage-regexp-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-regexp.html
A LayoutTests/http/tests/broadcastchannel/postmessage-set-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-set.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-sharedarraybuffer-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-sharedarraybuffer.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-sharedwasmmemory-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-sharedwasmmemory.html
A LayoutTests/http/tests/broadcastchannel/postmessage-string-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-string.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-typedarray-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-typedarray.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-videoframe-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-videoframe.html
A
LayoutTests/http/tests/broadcastchannel/postmessage-wasmmodule-expected.txt
A LayoutTests/http/tests/broadcastchannel/postmessage-wasmmodule.html
A
LayoutTests/http/tests/broadcastchannel/resources/broadcastchannel-test-harness.js
M Source/WebCore/Modules/filesystem/FileSystemStorageConnection.cpp
M Source/WebCore/Modules/filesystem/FileSystemStorageConnection.h
M Source/WebCore/bindings/js/SerializedScriptValue.cpp
M Source/WebCore/bindings/js/SerializedScriptValue.h
M Source/WebCore/bindings/js/SerializedScriptValueInternals.h
M Source/WebCore/html/ImageBitmap.cpp
M Source/WebCore/html/ImageBitmap.h
M Source/WebCore/html/OffscreenCanvas.h
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/ImageBuffer.h
M Source/WebCore/platform/mediastream/MediaStreamTrackDataHolder.cpp
M Source/WebCore/platform/mediastream/MediaStreamTrackDataHolder.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h
M Source/WebKit/WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp
Log Message:
-----------
`SerializedScriptValue::deserialize` cannot be called more than once (affects
BroadcastChannel postMessage())
rdar://171134726
Reviewed by Andy Estes and Ryosuke Niwa.
Since `::deserialize(...)` moves some of the SerializedScriptValue::Internals
members, it cannot be called twice.
This is normally fine, but when a single message has multiple recipients via
`BroadcastChannel.postMessage()`,
it ends up meaning that only the first recipient gets the complete message.
This patch adds SerializedScriptValue::clone() then uses it in the
BroadcastChannel case, making sure each recipient
gets a full copy of the message.
Covered by layout tests that exercise each supported `SerializedScriptValue`
type.
Tests: http/tests/broadcastchannel/postmessage-array.html
http/tests/broadcastchannel/postmessage-arraybuffer.html
http/tests/broadcastchannel/postmessage-audiodata.html
http/tests/broadcastchannel/postmessage-blob.html
http/tests/broadcastchannel/postmessage-boolean.html
http/tests/broadcastchannel/postmessage-date.html
http/tests/broadcastchannel/postmessage-domexception.html
http/tests/broadcastchannel/postmessage-encodedaudiochunk.html
http/tests/broadcastchannel/postmessage-encodedvideochunk.html
http/tests/broadcastchannel/postmessage-error.html
http/tests/broadcastchannel/postmessage-imagebitmap.html
http/tests/broadcastchannel/postmessage-imagedata.html
http/tests/broadcastchannel/postmessage-map.html
http/tests/broadcastchannel/postmessage-mediastreamtrack.html
http/tests/broadcastchannel/postmessage-null.html
http/tests/broadcastchannel/postmessage-number.html
http/tests/broadcastchannel/postmessage-object.html
http/tests/broadcastchannel/postmessage-regexp.html
http/tests/broadcastchannel/postmessage-set.html
http/tests/broadcastchannel/postmessage-sharedarraybuffer.html
http/tests/broadcastchannel/postmessage-sharedwasmmemory.html
http/tests/broadcastchannel/postmessage-string.html
http/tests/broadcastchannel/postmessage-typedarray.html
http/tests/broadcastchannel/postmessage-videoframe.html
http/tests/broadcastchannel/postmessage-wasmmodule.html
* LayoutTests/http/tests/broadcastchannel/.htaccess: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-array-expected.txt: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-array.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-arraybuffer-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-arraybuffer.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-audiodata-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-audiodata.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-blob-expected.txt: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-blob.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-boolean-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-boolean.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-date-expected.txt: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-date.html: Added.
*
LayoutTests/http/tests/broadcastchannel/postmessage-domexception-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-domexception.html: Added.
*
LayoutTests/http/tests/broadcastchannel/postmessage-encodedaudiochunk-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-encodedaudiochunk.html:
Added.
*
LayoutTests/http/tests/broadcastchannel/postmessage-encodedvideochunk-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-encodedvideochunk.html:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-error-expected.txt: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-error.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-imagebitmap-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-imagebitmap.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-imagedata-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-imagedata.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-map-expected.txt: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-map.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-null-expected.txt: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-null.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-number-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-number.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-object-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-object.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-regexp-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-regexp.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-set-expected.txt: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-set.html: Added.
*
LayoutTests/http/tests/broadcastchannel/postmessage-sharedarraybuffer-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-sharedarraybuffer.html:
Added.
*
LayoutTests/http/tests/broadcastchannel/postmessage-sharedwasmmemory-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-sharedwasmmemory.html:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-string-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-string.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-typedarray-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-typedarray.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-videoframe-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-videoframe.html: Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-wasmmodule-expected.txt:
Added.
* LayoutTests/http/tests/broadcastchannel/postmessage-wasmmodule.html: Added.
*
LayoutTests/http/tests/broadcastchannel/resources/broadcastchannel-test-harness.js:
Added.
(log):
(done):
(w.onmessage):
(w.onerror):
(postValue.try):
(postValue):
(checkResults):
(broadcastChannelTest):
* Source/WebCore/Modules/filesystem/FileSystemStorageConnection.cpp:
(WebCore::FileSystemHandleKeepAlive::copy const):
* Source/WebCore/Modules/filesystem/FileSystemStorageConnection.h:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::copyArrayBufferContentsArray):
(WebCore::SerializedScriptValue::clone const):
(WebCore::SerializedScriptValueInternals::clone const):
* Source/WebCore/bindings/js/SerializedScriptValue.h:
* Source/WebCore/bindings/js/SerializedScriptValueInternals.h:
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::DetachedImageBitmap::DetachedImageBitmap):
* Source/WebCore/html/ImageBitmap.h:
* Source/WebCore/html/OffscreenCanvas.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
* Source/WebCore/platform/graphics/ImageBuffer.h:
(WebCore::SerializedImageBuffer::clone const):
* Source/WebCore/platform/mediastream/MediaStreamTrackDataHolder.cpp:
(WebCore::MediaStreamTrackDataHolder::copy const):
* Source/WebCore/platform/mediastream/MediaStreamTrackDataHolder.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteSerializedImageBufferProxy::RemoteSerializedImageBufferProxy):
* Source/WebKit/WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:
(WebKit::WebBroadcastChannelRegistry::postMessageLocally):
Originally-landed-as: 305413.445@safari-7624-branch (5a0c6501d0f5).
rdar://176065281
Canonical link: https://commits.webkit.org/315347@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications