-
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.
Safari's IndexedDB data may not be deserialized correctly after syste…
…m upgrades https://bugs.webkit.org/show_bug.cgi?id=266806 rdar://120031024 Reviewed by Mark Lam. 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: Originally-landed-as: 272448.79@safari-7618-branch (7a1bb1a). rdar://124556752 Canonical link: https://commits.webkit.org/276710@main
- Loading branch information
1 parent
6cf8742
commit 3e904eb
Showing
2 changed files
with
67 additions
and
37 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