Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1d814c884dcbd1110a920a9a245831f0662a7631
https://github.com/WebKit/WebKit/commit/1d814c884dcbd1110a920a9a245831f0662a7631
Author: Brady Eidson <[email protected]>
Date: 2026-03-02 (Mon, 02 Mar 2026)
Changed paths:
M Source/WebKit/Shared/JavaScriptEvaluationResult.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm
Log Message:
-----------
Restore parts of previous JS->UIProcess serialization behavior
rdar://170984489
https://bugs.webkit.org/show_bug.cgi?id=308978
Reviewed by Tim Horton.
We've been making large changes to JavaScript object serialization over the
past ~6 months to support
much richer messaging between web content processes and the UI process.
One side effect has been a much richer support for objects being serialized
that previously were not.
This caused some regressions in some apps because they were successfully
serializing much more
complicated objects than before, which made their serialization slow down
significantly.
We tried to fix one such case in 306677@main by explicitly changing object ->
dictionary serialization
such that if any key or value fails to serialize, then the entire dictionary
should fail to serialize.
This was a change from our long standing JS serialization behavior - in at
least some cases - and
caused serialization failures in more apps that broke more functionality.
The number of apps where we identified the perf concern was small, and the new
behavior simply breaking
apps is much worse. Additionally, we'd actually already confirmed with authors
of some of those other
apps a change they could make in their application JavaScript to fix the perf
issue.
So it follows:
This patch restores the behavior of allowing a JavaScript object to
successfully serialize to a
dictionary even if specific key/value pairs cannot.
This restores important binary compatibility.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm
* Source/WebKit/Shared/JavaScriptEvaluationResult.cpp:
(WebKit::JavaScriptEvaluationResult::JSExtractor::addObjectToMap):
(WebKit::JavaScriptEvaluationResult::JSExtractor::processContainersWithoutRecursion):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:
((EvaluateJavaScript, Serialization)):
Canonical link: https://commits.webkit.org/308477@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications