mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-25 08:37:30 +09:00
parent
114aed058f
commit
4b0b628cdd
3 changed files with 0 additions and 32 deletions
|
|
@ -249,8 +249,6 @@ const char kSQLiteJournalSuffix[] = ".sqlite-journal";
|
||||||
const char kSQLiteSHMSuffix[] = ".sqlite-shm";
|
const char kSQLiteSHMSuffix[] = ".sqlite-shm";
|
||||||
const char kSQLiteWALSuffix[] = ".sqlite-wal";
|
const char kSQLiteWALSuffix[] = ".sqlite-wal";
|
||||||
|
|
||||||
const char kPrefIndexedDBEnabled[] = "dom.indexedDB.enabled";
|
|
||||||
|
|
||||||
const char kPrefFileHandleEnabled[] = "dom.fileHandle.enabled";
|
const char kPrefFileHandleEnabled[] = "dom.fileHandle.enabled";
|
||||||
|
|
||||||
#define IDB_PREFIX "indexedDB"
|
#define IDB_PREFIX "indexedDB"
|
||||||
|
|
@ -21172,16 +21170,6 @@ FactoryOp::CheckPermission(ContentParent* aContentParent,
|
||||||
return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
|
return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_WARN_IF(!Preferences::GetBool(kPrefIndexedDBEnabled, false))) {
|
|
||||||
if (aContentParent) {
|
|
||||||
// The DOM in the other process should have kept us from receiving any
|
|
||||||
// indexedDB messages so assume that the child is misbehaving.
|
|
||||||
aContentParent->KillHard("IndexedDB CheckPermission 1");
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ContentPrincipalInfo& contentPrincipalInfo =
|
const ContentPrincipalInfo& contentPrincipalInfo =
|
||||||
principalInfo.get_ContentPrincipalInfo();
|
principalInfo.get_ContentPrincipalInfo();
|
||||||
if (contentPrincipalInfo.attrs().mPrivateBrowsingId != 0) {
|
if (contentPrincipalInfo.attrs().mPrivateBrowsingId != 0) {
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,6 @@ namespace dom {
|
||||||
using namespace mozilla::dom::quota;
|
using namespace mozilla::dom::quota;
|
||||||
using namespace mozilla::ipc;
|
using namespace mozilla::ipc;
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const char kPrefIndexedDBEnabled[] = "dom.indexedDB.enabled";
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
class IDBFactory::BackgroundCreateCallback final
|
class IDBFactory::BackgroundCreateCallback final
|
||||||
: public nsIIPCBackgroundChildCreateCallback
|
: public nsIIPCBackgroundChildCreateCallback
|
||||||
{
|
{
|
||||||
|
|
@ -130,12 +124,6 @@ IDBFactory::CreateForWindow(nsPIDOMWindowInner* aWindow,
|
||||||
nsCOMPtr<nsIPrincipal> principal;
|
nsCOMPtr<nsIPrincipal> principal;
|
||||||
nsresult rv = AllowedForWindowInternal(aWindow, getter_AddRefs(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) {
|
if (rv == NS_ERROR_DOM_NOT_SUPPORTED_ERR) {
|
||||||
NS_WARNING("IndexedDB is not permitted in a third-party window.");
|
NS_WARNING("IndexedDB is not permitted in a third-party window.");
|
||||||
*aFactory = nullptr;
|
*aFactory = nullptr;
|
||||||
|
|
@ -246,12 +234,6 @@ IDBFactory::CreateForMainThreadJSInternal(
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
MOZ_ASSERT(aPrincipalInfo);
|
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();
|
IndexedDatabaseManager* mgr = IndexedDatabaseManager::GetOrCreate();
|
||||||
if (NS_WARN_IF(!mgr)) {
|
if (NS_WARN_IF(!mgr)) {
|
||||||
IDB_REPORT_INTERNAL_ERR();
|
IDB_REPORT_INTERNAL_ERR();
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,6 @@ pref("browser.download.saveZoneInformation", 2);
|
||||||
// Whether or not testing features are enabled.
|
// Whether or not testing features are enabled.
|
||||||
pref("dom.quotaManager.testing", false);
|
pref("dom.quotaManager.testing", false);
|
||||||
|
|
||||||
// Whether or not indexedDB is enabled.
|
|
||||||
pref("dom.indexedDB.enabled", true);
|
|
||||||
// Whether or not indexedDB experimental features are enabled.
|
// Whether or not indexedDB experimental features are enabled.
|
||||||
pref("dom.indexedDB.experimental", false);
|
pref("dom.indexedDB.experimental", false);
|
||||||
// Enable indexedDB logging.
|
// Enable indexedDB logging.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue