Bug 1363542 - Remove unused nsChromeRegistry::ManifestProcessingContext::GetXPConnect() method. r=froydnj
authorAndrew McCreight <continuation@gmail.com>
Tue, 09 May 2017 14:16:24 -0700
changeset 406007 080fe566625d28ae9da8494eae16c232c0f35243
parent 406006 895fea10d5956e32fd11418fed7a70239cada8c0
child 406008 2fe5307c0bbc2ff129e99d11c8365a9db254b071
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1363542
milestone55.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 1363542 - Remove unused nsChromeRegistry::ManifestProcessingContext::GetXPConnect() method. r=froydnj MozReview-Commit-ID: KkhT1vd0adM
chrome/nsChromeRegistry.h
chrome/nsChromeRegistryChrome.cpp
--- a/chrome/nsChromeRegistry.h
+++ b/chrome/nsChromeRegistry.h
@@ -13,17 +13,16 @@
 #ifdef MOZ_XUL
 #include "nsIXULOverlayProvider.h"
 #endif
 
 #include "nsString.h"
 #include "nsURIHashKey.h"
 #include "nsInterfaceHashtable.h"
 #include "nsXULAppAPI.h"
-#include "nsIXPConnect.h"
 
 #include "mozilla/FileLocation.h"
 
 class nsPIDOMWindowOuter;
 class nsIPrefBranch;
 class nsIURL;
 
 // The chrome registry is actually split between nsChromeRegistryChrome and
@@ -108,24 +107,21 @@ public:
       : mType(aType)
       , mFile(aFile)
     { }
 
     ~ManifestProcessingContext()
     { }
 
     nsIURI* GetManifestURI();
-    nsIXPConnect* GetXPConnect();
-
     already_AddRefed<nsIURI> ResolveURI(const char* uri);
 
     NSLocationType mType;
     mozilla::FileLocation mFile;
     nsCOMPtr<nsIURI> mManifestURI;
-    nsCOMPtr<nsIXPConnect> mXPConnect;
   };
 
   virtual void ManifestContent(ManifestProcessingContext& cx, int lineno,
                                char *const * argv, int flags) = 0;
   virtual void ManifestLocale(ManifestProcessingContext& cx, int lineno,
                               char *const * argv, int flags) = 0;
   virtual void ManifestSkin(ManifestProcessingContext& cx, int lineno,
                             char *const * argv, int flags) = 0;
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -29,17 +29,16 @@
 #include "mozilla/intl/LocaleService.h"
 
 #include "nsIObserverService.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "mozilla/Preferences.h"
 #include "nsIResProtocolHandler.h"
 #include "nsIScriptError.h"
-#include "nsIXPConnect.h"
 #include "nsIXULRuntime.h"
 
 #define SELECTED_SKIN_PREF   "general.skins.selectedSkin"
 #define PACKAGE_OVERRIDE_BRANCH "chrome.override_package."
 
 using namespace mozilla;
 using mozilla::dom::ContentParent;
 using mozilla::dom::PContentParent;
@@ -614,25 +613,16 @@ nsChromeRegistry::ManifestProcessingCont
   if (!mManifestURI) {
     nsCString uri;
     mFile.GetURIString(uri);
     NS_NewURI(getter_AddRefs(mManifestURI), uri);
   }
   return mManifestURI;
 }
 
-nsIXPConnect*
-nsChromeRegistry::ManifestProcessingContext::GetXPConnect()
-{
-  if (!mXPConnect)
-    mXPConnect = do_GetService("@mozilla.org/js/xpc/XPConnect;1");
-
-  return mXPConnect;
-}
-
 already_AddRefed<nsIURI>
 nsChromeRegistry::ManifestProcessingContext::ResolveURI(const char* uri)
 {
   nsIURI* baseuri = GetManifestURI();
   if (!baseuri)
     return nullptr;
 
   nsCOMPtr<nsIURI> resolved;