Bug 155664

Summary: Consider to cap the size of session history data.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, kling, mitz, sam
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Cap the session history data size to 2MB in iOS.
none
Cap the session history data size to 2MB in iOS.
darin: review+
Address review comment before landing. none

Description Yongjun Zhang 2016-03-18 14:41:13 PDT
When encode the session history to data blob, we serialize all the history entries in back/forward list. We should consider to limit the size of this data blob.
Comment 1 Yongjun Zhang 2016-03-18 14:42:22 PDT
<rdar://problem/25064718>
Comment 2 Yongjun Zhang 2016-03-18 16:59:43 PDT
Created attachment 274479 [details]
Cap the session history data size to 2MB in iOS.
Comment 3 Yongjun Zhang 2016-03-18 17:02:49 PDT
Created attachment 274480 [details]
Cap the session history data size to 2MB in iOS.
Comment 4 Darin Adler 2016-03-18 22:28:19 PDT
Comment on attachment 274480 [details]
Cap the session history data size to 2MB in iOS.

View in context: https://bugs.webkit.org/attachment.cgi?id=274480&action=review

> Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:66
> +static const uint32_t maximumSessionStateDataSize = UINT_MAX;

I would prefer std::numeric_limits<uint32_t>::max() to UINT_MAX when used here.
Comment 5 Yongjun Zhang 2016-03-18 23:16:31 PDT
Created attachment 274509 [details]
Address review comment before landing.
Comment 6 WebKit Commit Bot 2016-03-19 00:17:46 PDT
Comment on attachment 274509 [details]
Address review comment before landing.

Clearing flags on attachment: 274509

Committed r198468: <http://trac.webkit.org/changeset/198468>
Comment 7 WebKit Commit Bot 2016-03-19 00:17:53 PDT
All reviewed patches have been landed.  Closing bug.