mirror of
https://github.com/servo/servo
synced 2026-05-14 19:06:31 +02:00
The spec concept of [opening a database](https://www.w3.org/TR/IndexedDB-2/#open-a-database), and the conditional [upgrade of a database](https://w3c.github.io/IndexedDB/#upgrade-a-database), should be run in-parallel, meaning on the backend indexeddb thread, and not on the script-thread. This implements the move, but retains a blocking wait on the upgrade transaction finish. It is the first step towards a larger refactoring(see https://github.com/servo/servo/issues/40983), which will see concepts like transaction lifecyle and connection queues be implemented on the indexeddb thread, and which will make any waiting non-blocking as well. Other smaller changes to support the above are: - returning whether a physical db was created when instantiating the db engine. - using a global counter to produce transaction ids. Testing: New failures on WPT tests: to be fixed as part of several follow-ups. Fixes: The parts of https://github.com/servo/servo/issues/38942#issuecomment-3270223903 that were not addressed when the issue was closed. --------- Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> Signed-off-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com> Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>