Bug 1285378 - Remove dom.global-constructor.disable pref check from script namespace manager. r=jst
authorReuben Morais <reuben.morais@gmail.com>
Sat, 30 Jul 2016 10:42:12 -0300
changeset 347521 ce119faadbc5999895c73ecbdab003d761ce296e
parent 347520 59ddf661a7ee6f05e59c296981f125f49a7478ae
child 347522 1b848daf2102cb0636c9475ae424836abef5ca7f
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs1285378
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1285378 - Remove dom.global-constructor.disable pref check from script namespace manager. r=jst
dom/base/nsScriptNameSpaceManager.cpp
--- a/dom/base/nsScriptNameSpaceManager.cpp
+++ b/dom/base/nsScriptNameSpaceManager.cpp
@@ -13,17 +13,16 @@
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIScriptNameSpaceManager.h"
 #include "nsIScriptContext.h"
 #include "nsIInterfaceInfoManager.h"
 #include "nsIInterfaceInfo.h"
 #include "xptinfo.h"
 #include "nsXPIDLString.h"
-#include "nsPrintfCString.h"
 #include "nsReadableUtils.h"
 #include "nsHashKeys.h"
 #include "nsDOMClassInfo.h"
 #include "nsCRT.h"
 #include "nsIObserverService.h"
 #include "nsISimpleEnumerator.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
@@ -318,25 +317,16 @@ nsScriptNameSpaceManager::OperateCategor
     return NS_OK;
   }
 
   nsXPIDLCString contractId;
   rv = aCategoryManager->GetCategoryEntry(aCategory, categoryEntry.get(),
                                           getter_Copies(contractId));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  if (type == nsGlobalNameStruct::eTypeExternalConstructor) {
-    nsPrintfCString prefName("dom.global-constructor.disable.%s",
-                             categoryEntry.get());
-    if (Preferences::GetType(prefName.get()) == nsIPrefBranch::PREF_BOOL &&
-        Preferences::GetBool(prefName.get(), false)) {
-        return NS_OK;
-    }
-  }
-
   nsCOMPtr<nsIComponentRegistrar> registrar;
   rv = NS_GetComponentRegistrar(getter_AddRefs(registrar));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCID *cidPtr;
   rv = registrar->ContractIDToCID(contractId, &cidPtr);
 
   if (NS_FAILED(rv)) {