[tbb-commits] [tor-browser/tor-browser-38.1.0esr-5.0-1] Bug 16528: Prevent indexedDB Modernizr breakage (e10s highrisk).

mikeperry at torproject.org mikeperry at torproject.org
Mon Jul 27 15:51:26 UTC 2015


commit 0d808cd9cf4c7efbd1391c69fae63cf40822389e
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Mon Jul 13 13:43:18 2015 -0700

    Bug 16528: Prevent indexedDB Modernizr breakage (e10s highrisk).
    
    This change should make the indexedDB failure mode for pref checks equivalent
    to the private browsing failure mode. Sites that use Modernizr are accustomed
    to the failure modes for Private Browsing usage of IndexedDB, but not for when
    the pref is disabled.
    
    This patch may cause serious issues with e10s in the future. We'll need to
    keep an eye on it for FF45.
---
 dom/indexedDB/ActorsParent.cpp |    1 +
 dom/indexedDB/IDBFactory.cpp   |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
index e32f9a4..ed5d8b3 100644
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -10756,6 +10756,7 @@ FactoryOp::CheckPermission(ContentParent* aContentParent,
     if (aContentParent) {
       // The DOM in the other process should have kept us from receiving any
       // indexedDB messages so assume that the child is misbehaving.
+      // XXX: Does this happen with e10s due to Bug #16528?
       aContentParent->KillHard("IndexedDB CheckPermission 1");
     }
     return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp
index 2ad3ee2..8acdf0f 100644
--- a/dom/indexedDB/IDBFactory.cpp
+++ b/dom/indexedDB/IDBFactory.cpp
@@ -132,11 +132,13 @@ IDBFactory::CreateForWindow(nsPIDOMWindow* aWindow,
   nsCOMPtr<nsIPrincipal> principal;
   nsresult rv = AllowedForWindowInternal(aWindow, getter_AddRefs(principal));
 
+  // XXX: Check Removed due to Bug #16528
+  /*
   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.");
@@ -265,11 +267,13 @@ IDBFactory::CreateForMainThreadJSInternal(
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aPrincipalInfo);
 
+  /* XXX: Check Removed to due #16528
   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)) {





More information about the tbb-commits mailing list