diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-28 09:06:15 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-28 09:06:15 +0000 |
commit | cd61ec0d598a64bea889c17252ce67fc2d0b463e (patch) | |
tree | fc8cc697b353248927897402eb0a728735a587f5 /webkit/glue/glue_serialize.cc | |
parent | 1ecfa63f9c178bd3e49a1280cf31b318c7187df1 (diff) | |
download | chromium_src-cd61ec0d598a64bea889c17252ce67fc2d0b463e.zip chromium_src-cd61ec0d598a64bea889c17252ce67fc2d0b463e.tar.gz chromium_src-cd61ec0d598a64bea889c17252ce67fc2d0b463e.tar.bz2 |
Resolve issues with GlueSerializeTest.BackwardsCompatibleTest by
appending the new documentSequenceNumber entry to the end of the
pickle.
This test forges kVersion, but the function to serialize a
WebHistoryItem does not take the current value of kVersion
into account. It did not do so before, so instead of trying
to make it do so now, I just chose to append the new field.
TBR=sky
Review URL: http://codereview.chromium.org/556057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/glue_serialize.cc')
-rw-r--r-- | webkit/glue/glue_serialize.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc index d16a0bc..9b537ab 100644 --- a/webkit/glue/glue_serialize.cc +++ b/webkit/glue/glue_serialize.cc @@ -274,8 +274,6 @@ static void WriteHistoryItem( WriteStringVector(item.documentState(), obj); - WriteInteger64(item.documentSequenceNumber(), obj); - // Yes, the referrer is written twice. This is for backwards // compatibility with the format. WriteFormData(item.httpBody(), obj); @@ -287,6 +285,8 @@ static void WriteHistoryItem( WriteInteger(static_cast<int>(children.size()), obj); for (size_t i = 0, c = children.size(); i < c; ++i) WriteHistoryItem(children[i], obj); + + WriteInteger64(item.documentSequenceNumber(), obj); } // Creates a new HistoryItem tree based on the serialized string. @@ -318,9 +318,6 @@ static WebHistoryItem ReadHistoryItem( item.setDocumentState(ReadStringVector(obj)); - if (obj->version >= 6) - item.setDocumentSequenceNumber(ReadInteger64(obj)); - // The extra referrer string is read for backwards compat. const WebHTTPBody& http_body = ReadFormData(obj); const WebString& http_content_type = ReadString(obj); @@ -335,6 +332,9 @@ static WebHistoryItem ReadHistoryItem( for (int i = 0; i < num_children; ++i) item.appendToChildren(ReadHistoryItem(obj, include_form_data)); + if (obj->version >= 6) + item.setDocumentSequenceNumber(ReadInteger64(obj)); + return item; } |