diff options
| author | Grace Kloba <klobag@google.com> | 2009-11-09 13:44:38 -0800 |
|---|---|---|
| committer | Grace Kloba <klobag@google.com> | 2009-11-09 13:44:38 -0800 |
| commit | 13849e573d5c1d04724e37d543bd5b95f7445d8a (patch) | |
| tree | 8fc5af1e4e951056eab5e51913cdc8d21d65797f /WebKit/android/jni/WebHistory.cpp | |
| parent | 1e3557295c152b901e406d0dc6e810f033d8c4db (diff) | |
| parent | ef7b176b34c6a1fe082a87dd17523e47737c1e19 (diff) | |
| download | external_webkit-13849e573d5c1d04724e37d543bd5b95f7445d8a.zip external_webkit-13849e573d5c1d04724e37d543bd5b95f7445d8a.tar.gz external_webkit-13849e573d5c1d04724e37d543bd5b95f7445d8a.tar.bz2 | |
resolved conflicts for merge of ef7b176b to master
Diffstat (limited to 'WebKit/android/jni/WebHistory.cpp')
| -rw-r--r-- | WebKit/android/jni/WebHistory.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/WebKit/android/jni/WebHistory.cpp b/WebKit/android/jni/WebHistory.cpp index 2193d06..4a7c84e 100644 --- a/WebKit/android/jni/WebHistory.cpp +++ b/WebKit/android/jni/WebHistory.cpp @@ -420,9 +420,12 @@ static void write_item(WTF::Vector<char>& v, WebCore::HistoryItem* item) // Form data const WebCore::FormData* formData = item->formData(); - if (formData) + if (formData) { write_string(v, formData->flattenToString()); - else + // save the identifier as it is not included in the flatten data + int64_t id = formData->identifier(); + v.append((char*)&id, sizeof(int64_t)); + } else write_string(v, WebCore::String()); // Empty constructor does not allocate a buffer. // Target @@ -573,6 +576,15 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, else return false; data += l; + // Read the identifier + { + int64_t id; + int size = (int)sizeof(int64_t); + memcpy(&id, data, size); + data += size; + if (id) + formData->setIdentifier(id); + } } if (end - data < sizeofUnsigned) return false; |
