Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUpgradeVersion should return the upgraded version for IndexedDB #25322
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When handeling the
SyncOperation::UpgradeVersioncase inhandle_sync_operation, we currently upgrade the database version by assigningdb.version = version;. As of now, this never fails and it is ok to return the value immediately. However, the database upgrade should not behave like this in once we allow multiple database connections. Instead of returning the version immediately, we should get the version from the database environment.To illustrate:
open with version v10->open with version v9->db upgrades to v10->db upgrades to v9This would result in the wrong version being returned (
v9) by the upgrade version function, but the true version isv10(we cannot downgrade the version).Task
Files
components\net\indexeddb\idb_thread.rs