Page MenuHomePhabricator

[web-db] avoid database init on app start on Safari
ClosedPublic

Authored by kamil on Jun 6 2023, 10:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 17, 9:23 PM
Unknown Object (File)
Mar 4 2024, 11:30 PM
Unknown Object (File)
Feb 11 2024, 6:11 AM
Unknown Object (File)
Feb 10 2024, 5:52 AM
Subscribers

Details

Summary

In general, we establish database connection immediately after app start, on Safari we need to wait for encryption key generated from main thread.
(context)

Depends on D8123

Test Plan

Database should be inited from sqlite-data-handler.js

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jun 7 2023, 1:52 AM
kamil added inline comments.
web/database/database-module-provider.js
38 ↗(On Diff #27491)

Naming might be confusing, but at this point database is not supported (we don't have a key to it), it will be supported after main thread will provide encryption key

tomek added inline comments.
web/database/database-module-provider.js
37 ↗(On Diff #27491)

Can we have a const instead of a function that tells if it is Safari? We can avoid having to detect the browser multiple times, as this fact doesn't change through the lifetime of the app.

This revision is now accepted and ready to land.Jun 13 2023, 4:31 AM
web/database/database-module-provider.js
38 ↗(On Diff #27491)

Do we change the status later?

address review

web/database/database-module-provider.js
37 ↗(On Diff #27491)

good point, thanks

38 ↗(On Diff #27491)

yes, in initDBForLoggedInUser()