forked from mirrors/gecko-dev
Bug 1475218 - Disable PBackgroundLocalStorageCache on Android; r=asuth
There can be only one content process on Fennec so there's nothing to synchronize.
This commit is contained in:
parent
93ba371b66
commit
612c73ef66
2 changed files with 10 additions and 0 deletions
|
|
@ -443,7 +443,9 @@ LocalStorageCache::SetItem(const LocalStorage* aStorage, const nsAString& aKey,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
NotifyObservers(aStorage, nsString(aKey), aOld, aValue);
|
||||
#endif
|
||||
|
||||
if (Persist(aStorage)) {
|
||||
StorageDBChild* storageChild = StorageDBChild::Get();
|
||||
|
|
@ -491,7 +493,9 @@ LocalStorageCache::RemoveItem(const LocalStorage* aStorage,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
NotifyObservers(aStorage, nsString(aKey), aOld, VoidString());
|
||||
#endif
|
||||
|
||||
if (Persist(aStorage)) {
|
||||
StorageDBChild* storageChild = StorageDBChild::Get();
|
||||
|
|
@ -539,9 +543,11 @@ LocalStorageCache::Clear(const LocalStorage* aStorage,
|
|||
return hadData ? NS_OK : NS_SUCCESS_DOM_NO_OPERATION;
|
||||
}
|
||||
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
if (hadData) {
|
||||
NotifyObservers(aStorage, VoidString(), VoidString(), VoidString());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Persist(aStorage) && (refresh || hadData)) {
|
||||
StorageDBChild* storageChild = StorageDBChild::Get();
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ LocalStorageManager::GetStorageInternal(CreateMode aCreateMode,
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
PBackgroundChild* backgroundActor =
|
||||
BackgroundChild::GetOrCreateForCurrentThread();
|
||||
if (NS_WARN_IF(!backgroundActor)) {
|
||||
|
|
@ -263,11 +264,13 @@ LocalStorageManager::GetStorageInternal(CreateMode aCreateMode,
|
|||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
// There is always a single instance of a cache per scope
|
||||
// in a single instance of a DOM storage manager.
|
||||
cache = PutCache(originAttrSuffix, originKey, aPrincipal);
|
||||
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
LocalStorageCacheChild* actor = new LocalStorageCacheChild(cache);
|
||||
|
||||
MOZ_ALWAYS_TRUE(
|
||||
|
|
@ -278,6 +281,7 @@ LocalStorageManager::GetStorageInternal(CreateMode aCreateMode,
|
|||
privateBrowsingId));
|
||||
|
||||
cache->SetActor(actor);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (aRetval) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue