From ae9e2ec930f35e56c17dae2efe63cbf1f3f6b57e Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Mon, 25 Nov 2013 15:59:01 -0800 Subject: [PATCH] Back out d84bce4e8f2c (bug 943023) because of build errors on a CLOSED TREE --- rdf/base/src/moz.build | 2 +- rdf/base/src/nsCompositeDataSource.cpp | 2 ++ rdf/base/src/nsContainerEnumerator.cpp | 9 +++++++-- rdf/base/src/nsRDFContainer.cpp | 5 +++-- rdf/base/src/nsRDFContainerUtils.cpp | 3 ++- rdf/base/src/nsRDFContentSink.cpp | 10 +++++++--- rdf/base/src/nsRDFXMLDataSource.cpp | 3 ++- rdf/datasource/src/moz.build | 2 +- toolkit/components/alerts/moz.build | 2 +- toolkit/components/autocomplete/moz.build | 2 +- toolkit/components/mediasniffer/moz.build | 7 +++++-- toolkit/components/mediasniffer/nsMediaSniffer.h | 4 ---- toolkit/components/protobuf/moz.build | 2 +- toolkit/components/url-classifier/moz.build | 8 ++------ 14 files changed, 35 insertions(+), 26 deletions(-) diff --git a/rdf/base/src/moz.build b/rdf/base/src/moz.build index 928ea4872866..c6434b80f540 100644 --- a/rdf/base/src/moz.build +++ b/rdf/base/src/moz.build @@ -4,7 +4,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -UNIFIED_SOURCES += [ +SOURCES += [ 'nsCompositeDataSource.cpp', 'nsContainerEnumerator.cpp', 'nsDefaultResourceFactory.cpp', diff --git a/rdf/base/src/nsCompositeDataSource.cpp b/rdf/base/src/nsCompositeDataSource.cpp index 50ee18f2b619..d0a532694e08 100644 --- a/rdf/base/src/nsCompositeDataSource.cpp +++ b/rdf/base/src/nsCompositeDataSource.cpp @@ -49,6 +49,8 @@ PRLogModuleInfo* nsRDFLog = nullptr; #endif +static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); + //---------------------------------------------------------------------- // // CompositeDataSourceImpl diff --git a/rdf/base/src/nsContainerEnumerator.cpp b/rdf/base/src/nsContainerEnumerator.cpp index 7822118d4024..d91963806ac6 100644 --- a/rdf/base/src/nsContainerEnumerator.cpp +++ b/rdf/base/src/nsContainerEnumerator.cpp @@ -36,6 +36,11 @@ //////////////////////////////////////////////////////////////////////// +static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); +static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID); + +//////////////////////////////////////////////////////////////////////// + class ContainerEnumeratorImpl : public nsISimpleEnumerator { private: // pseudo-constants @@ -79,7 +84,7 @@ ContainerEnumeratorImpl::Init() { if (gRefCnt++ == 0) { nsresult rv; - nsCOMPtr rdf = do_GetService(NS_RDFSERVICE_CID); + nsCOMPtr rdf = do_GetService(kRDFServiceCID); NS_ASSERTION(rdf != nullptr, "unable to acquire resource manager"); if (! rdf) return NS_ERROR_FAILURE; @@ -88,7 +93,7 @@ ContainerEnumeratorImpl::Init() NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get resource"); if (NS_FAILED(rv)) return rv; - rv = CallGetService(NS_RDFCONTAINERUTILS_CID, &gRDFC); + rv = CallGetService(kRDFContainerUtilsCID, &gRDFC); if (NS_FAILED(rv)) return rv; } diff --git a/rdf/base/src/nsRDFContainer.cpp b/rdf/base/src/nsRDFContainer.cpp index 2fe6094c5181..751dbbeddb25 100644 --- a/rdf/base/src/nsRDFContainer.cpp +++ b/rdf/base/src/nsRDFContainer.cpp @@ -47,6 +47,7 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID); +static const char kRDFNameSpaceURI[] = RDF_NAMESPACE_URI; #define RDF_SEQ_LIST_LIMIT 8 @@ -687,9 +688,9 @@ RDFContainerImpl::GetNextValue(nsIRDFResource** aResult) } } - char buf[sizeof(RDF_NAMESPACE_URI) + 16]; + char buf[sizeof(kRDFNameSpaceURI) + 16]; nsFixedCString nextValStr(buf, sizeof(buf), 0); - nextValStr = RDF_NAMESPACE_URI; + nextValStr = kRDFNameSpaceURI; nextValStr.Append("_"); nextValStr.AppendInt(nextVal, 10); diff --git a/rdf/base/src/nsRDFContainerUtils.cpp b/rdf/base/src/nsRDFContainerUtils.cpp index 39a69cca5cf0..70dbed085093 100644 --- a/rdf/base/src/nsRDFContainerUtils.cpp +++ b/rdf/base/src/nsRDFContainerUtils.cpp @@ -23,6 +23,7 @@ #include "rdf.h" #include "rdfutil.h" +static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static const char kRDFNameSpaceURI[] = RDF_NAMESPACE_URI; class RDFContainerUtilsImpl : public nsIRDFContainerUtils @@ -324,7 +325,7 @@ RDFContainerUtilsImpl::RDFContainerUtilsImpl() if (gRefCnt++ == 0) { nsresult rv; - rv = CallGetService(NS_RDFSERVICE_CID, &gRDFService); + rv = CallGetService(kRDFServiceCID, &gRDFService); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service"); if (NS_SUCCEEDED(rv)) { diff --git a/rdf/base/src/nsRDFContentSink.cpp b/rdf/base/src/nsRDFContentSink.cpp index 9bad2a94674f..90fd3a274c08 100644 --- a/rdf/base/src/nsRDFContentSink.cpp +++ b/rdf/base/src/nsRDFContentSink.cpp @@ -74,9 +74,13 @@ using namespace mozilla; static NS_DEFINE_IID(kIContentSinkIID, NS_ICONTENT_SINK_IID); // XXX grr... static NS_DEFINE_IID(kIExpatSinkIID, NS_IEXPATSINK_IID); static NS_DEFINE_IID(kIRDFServiceIID, NS_IRDFSERVICE_IID); +static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIXMLContentSinkIID, NS_IXMLCONTENT_SINK_IID); static NS_DEFINE_IID(kIRDFContentSinkIID, NS_IRDFCONTENTSINK_IID); +static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); +static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID); + //////////////////////////////////////////////////////////////////////// #ifdef PR_LOGGING @@ -278,7 +282,7 @@ RDFContentSinkImpl::RDFContentSinkImpl() mDocumentURL(nullptr) { if (gRefCnt++ == 0) { - nsresult rv = CallGetService(NS_RDFSERVICE_CID, &gRDFService); + nsresult rv = CallGetService(kRDFServiceCID, &gRDFService); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service"); if (NS_SUCCEEDED(rv)) { @@ -297,7 +301,7 @@ RDFContentSinkImpl::RDFContentSinkImpl() } - rv = CallGetService(NS_RDFCONTAINERUTILS_CID, &gRDFContainerUtils); + rv = CallGetService(kRDFContainerUtilsCID, &gRDFContainerUtils); NS_RegisterStaticAtoms(rdf_atoms); } @@ -381,7 +385,7 @@ RDFContentSinkImpl::QueryInterface(REFNSIID iid, void** result) if (iid.Equals(kIRDFContentSinkIID) || iid.Equals(kIXMLContentSinkIID) || iid.Equals(kIContentSinkIID) || - iid.Equals(NS_GET_IID(nsISupports))) { + iid.Equals(kISupportsIID)) { *result = static_cast(this); AddRef(); return NS_OK; diff --git a/rdf/base/src/nsRDFXMLDataSource.cpp b/rdf/base/src/nsRDFXMLDataSource.cpp index 1bae0ee1ab59..c6279c614022 100644 --- a/rdf/base/src/nsRDFXMLDataSource.cpp +++ b/rdf/base/src/nsRDFXMLDataSource.cpp @@ -100,6 +100,7 @@ //---------------------------------------------------------------------- static NS_DEFINE_CID(kRDFInMemoryDataSourceCID, NS_RDFINMEMORYDATASOURCE_CID); +static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); #ifdef PR_LOGGING static PRLogModuleInfo* gLog; @@ -413,7 +414,7 @@ RDFXMLDataSourceImpl::Init() if (NS_FAILED(rv)) return rv; if (gRefCnt++ == 0) { - rv = CallGetService(NS_RDFSERVICE_CID, &gRDFService); + rv = CallGetService(kRDFServiceCID, &gRDFService); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service"); if (NS_FAILED(rv)) return rv; diff --git a/rdf/datasource/src/moz.build b/rdf/datasource/src/moz.build index aecf7f7d14fb..768c137c583f 100644 --- a/rdf/datasource/src/moz.build +++ b/rdf/datasource/src/moz.build @@ -4,7 +4,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -UNIFIED_SOURCES += [ +SOURCES += [ 'nsFileSystemDataSource.cpp', 'nsLocalStore.cpp', ] diff --git a/toolkit/components/alerts/moz.build b/toolkit/components/alerts/moz.build index c773fd9f02b1..4433bd7d7080 100644 --- a/toolkit/components/alerts/moz.build +++ b/toolkit/components/alerts/moz.build @@ -12,7 +12,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'alerts' -UNIFIED_SOURCES += [ +SOURCES += [ 'nsAlertsService.cpp', 'nsXULAlerts.cpp', ] diff --git a/toolkit/components/autocomplete/moz.build b/toolkit/components/autocomplete/moz.build index 3e7cc261ffd1..6c766c22579c 100644 --- a/toolkit/components/autocomplete/moz.build +++ b/toolkit/components/autocomplete/moz.build @@ -17,7 +17,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'autocomplete' -UNIFIED_SOURCES += [ +SOURCES += [ 'nsAutoCompleteController.cpp', 'nsAutoCompleteSimpleResult.cpp', ] diff --git a/toolkit/components/mediasniffer/moz.build b/toolkit/components/mediasniffer/moz.build index 283a025fafa7..a1585563e9c1 100644 --- a/toolkit/components/mediasniffer/moz.build +++ b/toolkit/components/mediasniffer/moz.build @@ -10,10 +10,13 @@ EXPORTS += [ 'nsMediaSniffer.h', ] -UNIFIED_SOURCES += [ - 'mp3sniff.c', +SOURCES += [ 'nsMediaSniffer.cpp', 'nsMediaSnifferModule.cpp', ] +SOURCES += [ + 'mp3sniff.c', +] + FINAL_LIBRARY = 'xul' diff --git a/toolkit/components/mediasniffer/nsMediaSniffer.h b/toolkit/components/mediasniffer/nsMediaSniffer.h index 2daa1f67eeb5..9ded2783a463 100644 --- a/toolkit/components/mediasniffer/nsMediaSniffer.h +++ b/toolkit/components/mediasniffer/nsMediaSniffer.h @@ -4,8 +4,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef nsMediaSniffer_h -#define nsMediaSniffer_h #include "nsIModule.h" #include "nsIFactory.h" @@ -42,5 +40,3 @@ class nsMediaSniffer MOZ_FINAL : public nsIContentSniffer static nsMediaSnifferEntry sSnifferEntries[]; }; - -#endif diff --git a/toolkit/components/protobuf/moz.build b/toolkit/components/protobuf/moz.build index 8d4cdc5751df..3eca56220604 100644 --- a/toolkit/components/protobuf/moz.build +++ b/toolkit/components/protobuf/moz.build @@ -30,7 +30,7 @@ EXPORTS.protobuf.google.protobuf.io += [ 'google/protobuf/package_info.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'google/protobuf/extension_set.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/io/coded_stream.cc', diff --git a/toolkit/components/url-classifier/moz.build b/toolkit/components/url-classifier/moz.build index 20dfaa6c2a5b..cc8fd93105f4 100644 --- a/toolkit/components/url-classifier/moz.build +++ b/toolkit/components/url-classifier/moz.build @@ -17,9 +17,10 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'url-classifier' -UNIFIED_SOURCES += [ +SOURCES += [ 'ChunkSet.cpp', 'Classifier.cpp', + 'HashStore.cpp', 'LookupCache.cpp', 'nsCheckSummedOutputStream.cpp', 'nsUrlClassifierDBService.cpp', @@ -30,11 +31,6 @@ UNIFIED_SOURCES += [ 'ProtocolParser.cpp', ] -# contains variables that conflict with LookupCache.cpp -SOURCES += [ - 'HashStore.cpp', -] - EXTRA_COMPONENTS += [ 'nsURLClassifier.manifest', 'nsUrlClassifierHashCompleter.js',