Bug 134502 - Add a encodeLegacySessionState function
Summary: Add a encodeLegacySessionState function
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-01 11:53 PDT by Anders Carlsson
Modified: 2014-07-01 12:05 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.56 KB, patch)
2014-07-01 11:53 PDT, Anders Carlsson
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>