Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 624a3d6250ec7342a98c1c213283d442573ebda1 https://github.com/WebKit/WebKit/commit/624a3d6250ec7342a98c1c213283d442573ebda1 Author: Ben Nham <n...@apple.com> Date: 2024-01-30 (Tue, 30 Jan 2024)
Changed paths: M Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp Log Message: ----------- Limit size of target string in serialized session state https://bugs.webkit.org/show_bug.cgi?id=268410 rdar://120213426 Reviewed by Brady Eidson. We've seen some MobileSafari launches that take a long time during session restoration because the _WKSessionState object contains a back/forward list item with an absurdly large target string (like >500KB in size). To fix this, we are going to: - Arbitrarily limit the size of the persisted target string in the session state to 32KB (or 16K characters). - Tweak our session state data limit policy. Previously, if an item caused us to trip over the data limit, we would still serialize that potentially huge item but then avoid serializing any subsequent item. Now, we also avoid serializing the potentially huge item that caused us to trip over the data limit. - The first item is still exempted from the data limit on the presumption that we want session restoration of that item to have the maximum chance of success (e.g. in the case of a frontmost jetsam, we want that the first item in the restored tab to come back with as much state as possible). * Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp: (WebKit::encodeFrameStateNode): (WebKit::encodeSessionHistory): Canonical link: https://commits.webkit.org/273810@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes