HomePhabricator
Diffusion Comm 55eb78480cbf

[web] Move worker database globals to worker-database.js

Description

[web] Move worker database globals to worker-database.js

Summary:
Move the sqliteQueryExecutor and dbModule globals to another shared worker js module and expose functions to get/set them. This simplifies the identity client/ olm api as they can just use the global values. Additionaly I find it clearer in the shared worker code when the "set" operation is more explicit and not just an assignment.

Depends on D11236

Test Plan: Check that the database still works, data is persisted.

Reviewers: kamil, tomek

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11324

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Mar 12 2024, 10:08 AM
Reviewer
kamil
Differential Revision
D11324: [web] Move worker database globals to worker-database.js
Parents
rCOMM6d5574c4eb8f: [web] Rename database worker
Branches
Unknown
Tags
Unknown