Bug 945587 - Move the declarations of kRDFServiceCID to the consumer site
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 03 Dec 2013 23:57:17 -0500
changeset 174421 65b997a2db9a95c70c68e04df519283959087b54
parent 174358 8187818246ada71a574b536673231c076e9984ac
child 174422 e23b3552029eb651cea997e58d1c8ba52afb7bcb
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs945587
milestone28.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 945587 - Move the declarations of kRDFServiceCID to the consumer site
content/xul/templates/src/nsXULContentUtils.cpp
content/xul/templates/src/nsXULTemplateResultStorage.cpp
--- a/content/xul/templates/src/nsXULContentUtils.cpp
+++ b/content/xul/templates/src/nsXULContentUtils.cpp
@@ -56,18 +56,16 @@
 #include "nsCollationCID.h"
 #include "nsILocale.h"
 #include "nsILocaleService.h"
 #include "nsIConsoleService.h"
 #include "nsEscape.h"
 
 using namespace mozilla;
 
-static NS_DEFINE_CID(kRDFServiceCID,        NS_RDFSERVICE_CID);
-
 //------------------------------------------------------------------------
 
 nsIRDFService* nsXULContentUtils::gRDF;
 nsIDateTimeFormat* nsXULContentUtils::gFormat;
 nsICollation *nsXULContentUtils::gCollation;
 
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gXULTemplateLog;
@@ -81,16 +79,17 @@ extern PRLogModuleInfo* gXULTemplateLog;
 
 //------------------------------------------------------------------------
 // Constructors n' stuff
 //
 
 nsresult
 nsXULContentUtils::Init()
 {
+    static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
     nsresult rv = CallGetService(kRDFServiceCID, &gRDF);
     if (NS_FAILED(rv)) {
         return rv;
     }
 
 #define XUL_RESOURCE(ident, uri)                              \
   PR_BEGIN_MACRO                                              \
    rv = gRDF->GetResource(NS_LITERAL_CSTRING(uri), &(ident)); \
--- a/content/xul/templates/src/nsXULTemplateResultStorage.cpp
+++ b/content/xul/templates/src/nsXULTemplateResultStorage.cpp
@@ -4,22 +4,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIServiceManager.h"
 #include "nsRDFCID.h"
 #include "nsIRDFService.h"
 #include "nsString.h"
 #include "nsXULTemplateResultStorage.h"
 
-static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
-
 NS_IMPL_ISUPPORTS1(nsXULTemplateResultStorage, nsIXULTemplateResult)
 
 nsXULTemplateResultStorage::nsXULTemplateResultStorage(nsXULTemplateResultSetStorage* aResultSet)
 {
+    static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
     nsCOMPtr<nsIRDFService> rdfService = do_GetService(kRDFServiceCID);
     rdfService->GetAnonymousResource(getter_AddRefs(mNode));
     mResultSet = aResultSet;
     if (aResultSet) {
         mResultSet->FillColumnValues(mValues);
     }
 }