Introduce StructuredSerializeInternal forStorage parameter - #5576
Merged
webkit-early-warning-system merged 1 commit intoOct 20, 2022
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 4c01a49) Details
|
achristensen07
approved these changes
Oct 20, 2022
Contributor
There was a problem hiding this comment.
The spec says a TypeError.
Contributor
Author
There was a problem hiding this comment.
We are changing this, see w3c/webcodecs#589
youennf
force-pushed
the
eng/Introduce-StructuredSerializeInternal-forStorage-parameter
branch
from
October 20, 2022 15:08
4c01a49 to
5806333
Compare
Collaborator
|
EWS run on current version of this PR (hash 5806333) Details |
https://bugs.webkit.org/show_bug.cgi?id=246744 rdar://problem/101367447 Reviewed by Alex Christensen. We introduce a SerializationForStorage (No/Yes) parameter to SerializedScriptValue::create. This allows to throw in case we are serializing objects that are serializable but are throwing for forStorage=yes cases. Make use of SerializationForStorage parameter for WebCodecsEncodedVideoChunk as per https://w3c.github.io/webcodecs/#encodedvideochunk-serialization. The default is SerializationForStorage = No. We set SerializationForStorage = Yes for IDB and IDLSerializedScriptValue, which is used for History pushState. Both IDB and History.pushState are using https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage. Covered by added tests. * LayoutTests/imported/w3c/web-platform-tests/webcodecs/chunk-serialization.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/chunk-serialization.any.js: (test): * Source/WebCore/Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::update): * Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::putOrAdd): * Source/WebCore/Modules/webaudio/AudioWorkletNode.cpp: (WebCore::AudioWorkletNode::create): * Source/WebCore/bindings/js/JSDOMConvertSerializedScriptValue.h: (WebCore::Converter<IDLSerializedScriptValue<T>>::convert): * Source/WebCore/bindings/js/JSDOMWrapper.cpp: (WebCore::cloneAcrossWorlds): * Source/WebCore/bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::serialize): (WebCore::CloneSerializer::CloneSerializer): (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::SerializedScriptValue::create): * Source/WebCore/bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::convert): * Source/WebCore/dom/ErrorEvent.cpp: (WebCore::ErrorEvent::trySerializeError): * Source/WebCore/dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState): * Source/WebCore/page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): * Source/WebCore/page/WindowOrWorkerGlobalScope.cpp: (WebCore::WindowOrWorkerGlobalScope::structuredClone): * Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp: (WebCore::DedicatedWorkerGlobalScope::postMessage): * Source/WebCore/workers/Worker.cpp: (WebCore::Worker::postMessage): * Source/WebCore/workers/service/ExtendableMessageEvent.cpp: (WebCore::ExtendableMessageEvent::ExtendableMessageEvent): * Source/WebCore/workers/service/ServiceWorker.cpp: (WebCore::ServiceWorker::postMessage): * Source/WebCore/workers/service/ServiceWorkerClient.cpp: (WebCore::ServiceWorkerClient::postMessage): Canonical link: https://commits.webkit.org/255788@main
webkit-early-warning-system
force-pushed
the
eng/Introduce-StructuredSerializeInternal-forStorage-parameter
branch
from
October 20, 2022 16:38
5806333 to
664fe94
Compare
Collaborator
|
Committed 255788@main (664fe94): https://commits.webkit.org/255788@main Reviewed commits have been landed. Closing PR #5576 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
664fe94
5806333
🧪 gtk-wk2🧪 api-gtk🧪 mac-wk1