Bug 134502

Summary: Add a encodeLegacySessionState function
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, gyuyoung.kim, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Anders Carlsson 2014-07-01 11:53:04 PDT
Add a encodeLegacySessionState function
Comment 1 Anders Carlsson 2014-07-01 11:53:43 PDT
Created attachment 234180 [details]
Patch
Comment 2 WebKit Commit Bot 2014-07-01 11:56:03 PDT
Attachment 234180 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:408:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2014-07-01 11:58:04 PDT
Comment on attachment 234180 [details]
Patch

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

> Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:406
> +    if (!backForwardListState.currentIndex) {

don't think you want the braces here

> Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:460
> +    buffer.get()[2] = (sessionStateDataVersion & 0x0000ff0) >> 8;

this doesn't look right! should be 0x0000ff00, no?
Comment 4 Enrica Casucci 2014-07-01 12:00:35 PDT
Comment on attachment 234180 [details]
Patch

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

> Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:380
> +

unnecessary empty line.

> Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:407
> +        return createDictionary({ { sessionHistoryVersionKey, sessionHistoryVersionNumber.get() } });

Probably don't need braces here.
Comment 5 Enrica Casucci 2014-07-01 12:00:39 PDT
Comment on attachment 234180 [details]
Patch

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

> Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:380
> +

unnecessary empty line.

> Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:407
> +        return createDictionary({ { sessionHistoryVersionKey, sessionHistoryVersionNumber.get() } });

Probably don't need braces here.
Comment 6 Anders Carlsson 2014-07-01 12:05:16 PDT
Committed r170654: <http://trac.webkit.org/changeset/170654>