diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-29 00:16:29 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-29 00:16:29 +0200 |
commit | 097f982b32b1cb0915b760c1a40f67806081f45a (patch) | |
tree | bd90476a3c73b3f7045d666f944832da4aecf90f /dom/indexedDB/IDBFactory.cpp | |
parent | bb68f6a4378c930b1a02c6a8f1fa9a9dff2251b0 (diff) | |
download | UXP-097f982b32b1cb0915b760c1a40f67806081f45a.tar UXP-097f982b32b1cb0915b760c1a40f67806081f45a.tar.gz UXP-097f982b32b1cb0915b760c1a40f67806081f45a.tar.lz UXP-097f982b32b1cb0915b760c1a40f67806081f45a.tar.xz UXP-097f982b32b1cb0915b760c1a40f67806081f45a.zip |
Remove IndexedDB for content pref.
Tag Issue #765
Diffstat (limited to 'dom/indexedDB/IDBFactory.cpp')
-rw-r--r-- | dom/indexedDB/IDBFactory.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp index 663828978..825d2ac36 100644 --- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -47,12 +47,6 @@ namespace dom { using namespace mozilla::dom::quota; using namespace mozilla::ipc; -namespace { - -const char kPrefIndexedDBEnabled[] = "dom.indexedDB.enabled"; - -} // namespace - class IDBFactory::BackgroundCreateCallback final : public nsIIPCBackgroundChildCreateCallback { @@ -130,12 +124,6 @@ IDBFactory::CreateForWindow(nsPIDOMWindowInner* aWindow, nsCOMPtr<nsIPrincipal> principal; nsresult rv = AllowedForWindowInternal(aWindow, getter_AddRefs(principal)); - if (!(NS_SUCCEEDED(rv) && nsContentUtils::IsSystemPrincipal(principal)) && - NS_WARN_IF(!Preferences::GetBool(kPrefIndexedDBEnabled, false))) { - *aFactory = nullptr; - return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR; - } - if (rv == NS_ERROR_DOM_NOT_SUPPORTED_ERR) { NS_WARNING("IndexedDB is not permitted in a third-party window."); *aFactory = nullptr; @@ -246,12 +234,6 @@ IDBFactory::CreateForMainThreadJSInternal( MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(aPrincipalInfo); - if (aPrincipalInfo->type() != PrincipalInfo::TSystemPrincipalInfo && - NS_WARN_IF(!Preferences::GetBool(kPrefIndexedDBEnabled, false))) { - *aFactory = nullptr; - return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR; - } - IndexedDatabaseManager* mgr = IndexedDatabaseManager::GetOrCreate(); if (NS_WARN_IF(!mgr)) { IDB_REPORT_INTERNAL_ERR(); |