For #15279: remove redundant lazy wrapper from storage APIs.

They're currently lazy { lazy { value } }. Accessing `lazy.value`
directly allows us to make it lazy { value }. This should be more
performant and prevents us from double-counting these components.
upstream-sync
Michael Comella 4 years ago committed by Michael Comella
parent 89541a17f7
commit 090650485f

@ -303,9 +303,9 @@ class Core(
val lazyRemoteTabsStorage = lazyMonitored { RemoteTabsStorage() }
// For most other application code (non-startup), these wrappers are perfectly fine and more ergonomic.
val historyStorage by lazyMonitored { lazyHistoryStorage.value }
val bookmarksStorage by lazyMonitored { lazyBookmarksStorage.value }
val passwordsStorage by lazyMonitored { lazyPasswordsStorage.value }
val historyStorage: PlacesHistoryStorage get() = lazyHistoryStorage.value
val bookmarksStorage: PlacesBookmarksStorage get() = lazyBookmarksStorage.value
val passwordsStorage: SyncableLoginsStorage get() = lazyPasswordsStorage.value
val tabCollectionStorage by lazyMonitored {
TabCollectionStorage(

Loading…
Cancel
Save