-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick c3c2a42. https://bugs.webkit.org/show_bug.cgi?id=266806
Safari's IndexedDB data may not be deserialized correctly after system upgrades https://bugs.webkit.org/show_bug.cgi?id=266806 rdar://120031024 Reviewed by NOBODY (OOPS!). To fix rdar://119834827, we introduce version 12.1 to SerializeScriptValue, which changed the terminator of the indexed property section in array compared to version 12. To make sure deserializer knows to deserialize version 12.1, we encode the minor version in the highest 8 bits of version number. We keep the lowest 24 bit as major version number for backward compatibility (the previously stored 32-bit major version number can be intepreted as major version with minor version 0). * Source/WebCore/bindings/js/SerializedScriptValue.cpp: (WebCore::majorVersionFor): (WebCore::minorVersionFor): (WebCore::makeVersion): (WebCore::currentVersion): (WebCore::CloneSerializer::serialize): (WebCore::CloneSerializer::CloneSerializer): (WebCore::CloneDeserializer::deserializeString): (WebCore::CloneDeserializer::deserialize): (WebCore::CloneDeserializer::isValid const): (WebCore::CloneDeserializer::shouldRetryWithVersionUpgrade): (WebCore::CloneDeserializer::upgradeVersion): (WebCore::CloneDeserializer::read): (WebCore::CloneDeserializer::readFile): (WebCore::CloneDeserializer::readArrayBuffer): (WebCore::CloneDeserializer::readArrayBufferView): (WebCore::CloneDeserializer::readImageBitmap): (WebCore::CloneDeserializer::readTerminal): (WebCore::CloneDeserializer::version const): Deleted. (WebCore::SerializedScriptValue::wireFormatVersion): Deleted. * Source/WebCore/bindings/js/SerializedScriptValue.h: Canonical link: https://commits.webkit.org/267815.665@safari-7617.2.4.10-branch Identifier: 270272.2255@safari-7618-branch Canonical link: https://commits.webkit.org/266719.388@webkitglib/2.42
- Loading branch information
Showing
2 changed files
with
67 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters