mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 836943: Part 0 - Make sure IndexedDB attempts to initialize the storage service on the main thread. r=bent
This commit is contained in:
parent
2e63bd0796
commit
7e84b93246
@ -418,6 +418,11 @@ IndexedDatabaseManager::GetOrCreate()
|
||||
nsCOMPtr<nsIObserverService> obs = GetObserverService();
|
||||
NS_ENSURE_TRUE(obs, nullptr);
|
||||
|
||||
// Must initialize the storage service on the main thread.
|
||||
nsCOMPtr<mozIStorageService> ss =
|
||||
do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
|
||||
NS_ENSURE_TRUE(ss, nullptr);
|
||||
|
||||
// We need this callback to know when to shut down all our threads.
|
||||
rv = obs->AddObserver(instance, PROFILE_BEFORE_CHANGE_OBSERVER_ID, false);
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user