Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out a better way to handle IDBTransactions for IndexedDB #25328

Open
rasviitanen opened this issue Dec 18, 2019 · 0 comments
Open

Figure out a better way to handle IDBTransactions for IndexedDB #25328

rasviitanen opened this issue Dec 18, 2019 · 0 comments

Comments

@rasviitanen
Copy link
Contributor

@rasviitanen rasviitanen commented Dec 18, 2019

Currently, we register new transactions in the idb thread using a serial number that is associated with each transaction. This way, we are able to know which transaction we are refering to both in the script thread and in the idb thread. This could be considered a hack, and there is likely a better way of doing it.

One idea is to use channels, and let each IDBTransaction have a channel instead of a serial number. The receiving end is moved to the idb thread, and the sending end is saved in the IDBTransaction struct. This way, we should be able to queue requests on the transactions using the channel instead a serial number.

This would also mean that we can manage the transactions in a far better way.

Files
compontents/script/dom/idb_transaction.rs
compontents/net/indexeddb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.