diff options
author | John Reck <jreck@android.com> | 2012-09-04 16:01:46 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-09-04 16:01:46 -0700 |
commit | 49a105247bbbb06b1f1ec85c542d4dd5b1b019c3 (patch) | |
tree | 35853d2cf42159149488efab68307458d6398bc0 /Source/WebKit/android/jni | |
parent | abf93d76e0e37c2b42370f49dd171cde2096f92d (diff) | |
parent | 43e94fa8daa7eaaece0da98e14809891b3fd2b4c (diff) | |
download | external_webkit-49a105247bbbb06b1f1ec85c542d4dd5b1b019c3.zip external_webkit-49a105247bbbb06b1f1ec85c542d4dd5b1b019c3.tar.gz external_webkit-49a105247bbbb06b1f1ec85c542d4dd5b1b019c3.tar.bz2 |
am 43e94fa8: am 1a6030e7: Merge "Remove inconsistency between HistoryItem writing/reading"
* commit '43e94fa8daa7eaaece0da98e14809891b3fd2b4c':
Remove inconsistency between HistoryItem writing/reading
Diffstat (limited to 'Source/WebKit/android/jni')
-rw-r--r-- | Source/WebKit/android/jni/WebHistory.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/WebKit/android/jni/WebHistory.cpp b/Source/WebKit/android/jni/WebHistory.cpp index baafa00..c06244b 100644 --- a/Source/WebKit/android/jni/WebHistory.cpp +++ b/Source/WebKit/android/jni/WebHistory.cpp @@ -472,10 +472,13 @@ static void writeItem(WTF::Vector<char>& vector, WebCore::HistoryItem* item) // Form data const WebCore::FormData* formData = item->formData(); if (formData) { - writeString(vector, formData->flattenToString()); - // save the identifier as it is not included in the flatten data - int64_t id = formData->identifier(); - vector.append((char*)&id, sizeof(int64_t)); + WTF::String flattenedFormData = formData->flattenToString(); + writeString(vector, flattenedFormData); + if (!flattenedFormData.isEmpty()) { + // save the identifier as it is not included in the flatten data + int64_t id = formData->identifier(); + vector.append((char*)&id, sizeof(int64_t)); + } } else writeString(vector, WTF::String()); // Empty constructor does not allocate a buffer. |