Bug 973142 - Get rid of the MOZILLA_INTERNAL_API makefile variable; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 18 Feb 2014 01:56:51 -0500
changeset 169597 6a647f7bafe2d71086d1c52413ad2ec9122ba5e7
parent 169596 0050e64d10c85e32f2af391b843a01683de7c4bb
child 169598 5ecd0339a08714213de36fbf07433fc78ea00253
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersglandium
bugs973142
milestone30.0a1
Bug 973142 - Get rid of the MOZILLA_INTERNAL_API makefile variable; r=glandium It's just as easy to directly set the preprocessor macro in the moz.build files. Using this variable doesn't really buy us anything. This patch also removes unused code from rdf/tests/dsds.
config/config.mk
intl/unicharutil/util/internal/Makefile.in
intl/unicharutil/util/internal/moz.build
profile/dirserviceprovider/src/Makefile.in
profile/dirserviceprovider/src/moz.build
python/mozbuild/mozbuild/frontend/sandbox_symbols.py
rdf/tests/dsds/Makefile.in
rdf/tests/dsds/moz.build
rdf/tests/dsds/nsRDFDOMDataSource.cpp
rdf/tests/dsds/nsRDFDataSourceDS.cpp
rdf/tests/dsds/nsRDFDataSourceDS.h
rdf/tests/dsds/nsRDFDataSourceFactory.cpp
rdf/util/src/internal/Makefile.in
services/crypto/component/Makefile.in
toolkit/components/feeds/Makefile.in
toolkit/components/url-classifier/tests/Makefile.in
toolkit/components/url-classifier/tests/moz.build
toolkit/library/Makefile.in
toolkit/library/moz.build
xpcom/analysis/Makefile.in
xpcom/analysis/moz.build
xpcom/base/Makefile.in
xpcom/base/moz.build
xpcom/build/Makefile.in
xpcom/components/Makefile.in
xpcom/io/Makefile.in
xpcom/reflect/xptcall/src/md/unix/Makefile.in
xpcom/reflect/xptcall/src/md/win32/Makefile.in
xpcom/string/src/Makefile.in
xpcom/tests/moz.build
--- a/config/config.mk
+++ b/config/config.mk
@@ -415,18 +415,17 @@ AR_FLAGS += -LTCG
 endif
 endif # MOZ_PROFILE_USE
 endif # NO_PROFILE_GUIDED_OPTIMIZE
 
 ifdef _MSC_VER
 OS_LDFLAGS += $(DELAYLOAD_LDFLAGS)
 endif # _MSC_VER
 
-# Does the makefile specifies the internal XPCOM API linkage?
-ifneq (,$(MOZILLA_INTERNAL_API)$(LIBXUL_LIBRARY))
+ifneq (,$(LIBXUL_LIBRARY))
 DEFINES += -DMOZILLA_INTERNAL_API
 endif
 
 # Force XPCOM/widget/gfx methods to be _declspec(dllexport) when we're
 # building libxul libraries
 ifdef LIBXUL_LIBRARY
 DEFINES += \
 	  -DIMPL_LIBXUL \
--- a/intl/unicharutil/util/internal/Makefile.in
+++ b/intl/unicharutil/util/internal/Makefile.in
@@ -7,9 +7,8 @@
 # internal linkage. Components that use frozen (external) linkage should use
 # unicharutil_external_s.
 
 ifdef ENABLE_INTL_API
 LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
 endif
 
 DIST_INSTALL = 1
-MOZILLA_INTERNAL_API = 1
--- a/intl/unicharutil/util/internal/moz.build
+++ b/intl/unicharutil/util/internal/moz.build
@@ -9,9 +9,8 @@ include('../objs.mozbuild')
 UNIFIED_SOURCES += intl_unicharutil_util_cppsrcs
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '..',
     '../../src',
 ]
-
deleted file mode 100644
--- a/profile/dirserviceprovider/src/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# 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/.
-
-
-MOZILLA_INTERNAL_API = 1
--- a/profile/dirserviceprovider/src/moz.build
+++ b/profile/dirserviceprovider/src/moz.build
@@ -7,8 +7,10 @@
 include('objs.mozbuild')
 
 UNIFIED_SOURCES += modules_profiledirservice_src_csrcs
 
 LIBRARY_NAME = 'profdirserviceprovider_s'
 
 # we don't want the shared lib
 FORCE_STATIC_LIB = True
+
+DEFINES['MOZILLA_INTERNAL_API'] = True
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -307,17 +307,18 @@ VARIABLES = {
         """Linker libraries and flags.
 
         A list of libraries and flags to include when linking.
         """, None),
 
     'LIBXUL_LIBRARY': (bool, bool,
         """Whether the library in this directory is linked into libxul.
 
-        Implies ``MOZILLA_INTERNAL_API`` and ``FORCE_STATIC_LIB``.
+        Implies ``FORCE_STATIC_LIB`` and the ``MOZILLA_INTERNAL_API``
+        preprocessor macro.
         """, None),
 
     'LOCAL_INCLUDES': (StrictOrderingOnAppendList, list,
         """Additional directories to be searched for include files by the compiler.
         """, None),
 
     'MSVC_ENABLE_PGO': (bool, bool,
         """Whether profile-guided optimization is enabled for MSVC in this directory.
--- a/rdf/tests/dsds/Makefile.in
+++ b/rdf/tests/dsds/Makefile.in
@@ -1,12 +1,10 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
-
 EXTRA_DSO_LDOPTS = \
 		-L$(DIST)/bin \
 		$(XPCOM_LIBS) \
 		$(NSPR_LIBS) \
 		$(NULL)
--- a/rdf/tests/dsds/moz.build
+++ b/rdf/tests/dsds/moz.build
@@ -1,19 +1,10 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-SOURCES += [
-    'nsRDFDataSourceDS.cpp',
-    'nsRDFDataSourceFactory.cpp',
-]
-
-LIBRARY_NAME = 'rdfdsds'
-
-IS_COMPONENT = True
-
 RESOURCE_FILES.samples.rdf += [
     'DataSourceViewer.css',
     'DataSourceViewer.xul',
 ]
deleted file mode 100644
--- a/rdf/tests/dsds/nsRDFDOMDataSource.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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 __gen_nsRDFDOMDataSource_h__
-#define __gen_nsRDFDOMDataSource_h__
-
-#include "nsRDFDOMDataSource.h"
-
-/* starting interface:    nsRDFDOMDataSource */
-
-/* {0F78DA58-8321-11d2-8EAC-00805F29F370} */
-#define NS_IRDFDATASOURCE_IID_STR "0F78DA58-8321-11d2-8EAC-00805F29F370"
-#define NS_IRDFDATASOURCE_IID \
-  {0x0F78DA58, 0x8321, 0x11d2, \
-    { 0x8E, 0xAC, 0x00, 0x80, 0x5F, 0x29, 0xF3, 0x70 }}
-
-class nsRDFDOMDataSource : public nsISupports {
- public: 
-  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRDFDATASOURCE_IID)
-
-  /* void Init (in string uri); */
-  NS_IMETHOD Init(const char *uri) = 0;
-
-  /* readonly attribute string URI; */
-  NS_IMETHOD GetURI(char * *aURI) = 0;
-
-  /* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-  NS_IMETHOD GetSource(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsIRDFResource **_retval) = 0;
-
-  /* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-  NS_IMETHOD GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsISimpleEnumerator **_retval) = 0;
-
-  /* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
-  NS_IMETHOD GetTarget(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsIRDFNode **_retval) = 0;
-
-  /* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
-  NS_IMETHOD GetTargets(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsISimpleEnumerator **_retval) = 0;
-
-  /* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-  NS_IMETHOD Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue) = 0;
-
-  /* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
-  NS_IMETHOD Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) = 0;
-
-  /* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-  NS_IMETHOD HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval) = 0;
-
-  /* void AddObserver (in nsIRDFObserver aObserver); */
-  NS_IMETHOD AddObserver(nsIRDFObserver *aObserver) = 0;
-
-  /* void RemoveObserver (in nsIRDFObserver aObserver); */
-  NS_IMETHOD RemoveObserver(nsIRDFObserver *aObserver) = 0;
-
-  /* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */
-  NS_IMETHOD ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval) = 0;
-
-  /* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */
-  NS_IMETHOD ArcLabelsOut(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) = 0;
-
-  /* nsISimpleEnumerator GetAllResources (); */
-  NS_IMETHOD GetAllResources(nsISimpleEnumerator **_retval) = 0;
-
-  /* void Flush (); */
-  NS_IMETHOD Flush() = 0;
-
-  /* nsISimpleEnumerator GetAllCmds (in nsIRDFResource aSource); */
-  NS_IMETHOD GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) = 0;
-
-  /* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
-  NS_IMETHOD IsCommandEnabled(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments, bool *_retval) = 0;
-
-  /* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
-  NS_IMETHOD DoCommand(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments) = 0;
-
-  /* void beginUpdateBatch (); */
-  NS_IMETHOD BeginUpdateBatch() = 0;
-
-  /* void endUpdateBatch (); */
-  NS_IMETHOD EndUpdateBatch() = 0;
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsRDFDOMDataSource, NS_IRDFDATASOURCE_IID)
-
-#endif /* __gen_nsRDFDOMDataSource_h__ */
deleted file mode 100644
--- a/rdf/tests/dsds/nsRDFDataSourceDS.cpp
+++ /dev/null
@@ -1,456 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-
-#include "nsCRT.h"
-#include "nsCOMPtr.h"
-
-#include "nsIRDFService.h"
-#include "nsRDFCID.h"
-#include "nsIRDFDataSource.h"
-#include "nsIRDFRemoteDataSource.h"
-#include "rdf.h"
-
-#include "nsIServiceManager.h"
-
-#include "nsEnumeratorUtils.h"
-
-#include "nsXPIDLString.h"
-
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-
-/**
- * RDF vocabulary describing assertions in inner datasource
- *
- * For a particular resource, we want to provide all arcs out and
- * in that the inner datasource has.
- * This is done by introducing helper resources for each triple of
- * the form
- *   x-moz-dsds:<subject-resource-pointer><predicate-resource-pointer>\
- *              <object-node-pointer>
- * For each triple, that has the resource in question as subject, a
- * "arcsout" assertion goes from that resource to a x-moz-dsds resource.
- * For each triple, that has the resource in question as object, a
- * "arcsin" assertion goes from that resource to a x-moz-dsds resource.
- * For each x-moz-dsds resource, there is a "subject" arc to the subject,
- * a "predicate" arc to the predicate and a "object" arc to the object.
- *
- * The namespace of this vocabulary is
- * "http://www.mozilla.org/rdf/vocab/dsds".
- * 
- * XXX we might want to add a "qname" resource from each resource to a
- * somewhat canonical "prefix:localname" literal.
- */
-
-#define NS_RDF_DSDS_NAMESPACE_URI "http://www.mozilla.org/rdf/vocab/dsds#"
-#define NS_RDF_ARCSOUT NS_RDF_DSDS_NAMESPACE_URI "arcsout"
-#define NS_RDF_ARCSIN NS_RDF_DSDS_NAMESPACE_URI "arcsin"
-#define NS_RDF_SUBJECT NS_RDF_DSDS_NAMESPACE_URI "subject"
-#define NS_RDF_PREDICATE NS_RDF_DSDS_NAMESPACE_URI "predicate"
-#define NS_RDF_OBJECT NS_RDF_DSDS_NAMESPACE_URI "object"
-
-#define NC_RDF_Name  NC_NAMESPACE_URI "Name"
-#define NC_RDF_Value NC_NAMESPACE_URI "Value"
-#define NC_RDF_Child NC_NAMESPACE_URI "child"
-
-static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
-
-class nsRDFDataSourceDataSource :
-    public nsIRDFDataSource,
-    public nsIRDFRemoteDataSource {
-public: 
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIRDFDATASOURCE
-  NS_DECL_NSIRDFREMOTEDATASOURCE
-
-  nsRDFDataSourceDataSource();
-  virtual ~nsRDFDataSourceDataSource();
-  
-private:
-  nsCString mURI;
-  nsCOMPtr<nsIRDFDataSource> mDataSource;
-
-  static nsIRDFResource* kNC_Name;
-  static nsIRDFResource* kNC_Value;
-  static nsIRDFResource* kNC_Child;
-  
-};
-
-nsIRDFResource* nsRDFDataSourceDataSource::kNC_Name=nullptr;
-nsIRDFResource* nsRDFDataSourceDataSource::kNC_Value=nullptr;
-nsIRDFResource* nsRDFDataSourceDataSource::kNC_Child=nullptr;
-
-
-nsRDFDataSourceDataSource::nsRDFDataSourceDataSource()
-{
-}
-
-nsRDFDataSourceDataSource::~nsRDFDataSourceDataSource()
-{
-}
-
-
-NS_IMPL_ISUPPORTS2(nsRDFDataSourceDataSource,
-                   nsIRDFDataSource,
-                   nsIRDFRemoteDataSource)
-
-/**
- * Implement nsIRDFRemoteDataSource
- */
-
-/* readonly attribute boolean loaded; */
-NS_IMETHODIMP nsRDFDataSourceDataSource::GetLoaded(bool *aLoaded)
-{
-    nsCOMPtr<nsIRDFRemoteDataSource> remote =
-        do_QueryInterface(mDataSource);
-    if (remote) {
-        return remote->GetLoaded(aLoaded);
-    }
-    *aLoaded = true;
-    return NS_OK;
-}
-
-/* void Init (in string uri); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::Init(const char *uri)
-{
-  nsresult rv;
-
-  mURI = uri;
-
-  // cut off "rdf:datasource?"
-  NS_NAMED_LITERAL_CSTRING(prefix, "rdf:datasource");
-  nsAutoCString mInnerURI;
-  mInnerURI = Substring(mURI, prefix.Length() + 1);
-  // bail if datasorce is empty or we're trying to inspect ourself
-  if (mInnerURI.IsEmpty() || mInnerURI == prefix) {
-      mURI.Truncate();
-      return NS_ERROR_INVALID_ARG;
-  }
-  nsCOMPtr<nsIRDFService> rdf(do_GetService(kRDFServiceCID, &rv));
-  rv = rdf->GetDataSource(mInnerURI.get(), getter_AddRefs(mDataSource));
-  if (NS_FAILED(rv)) {
-      mURI.Truncate();
-      NS_WARNING("Could not get inner datasource");
-      return rv;
-  }
-
-  // get RDF resources
-  
-  if (!kNC_Name) {
-    rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Name), &kNC_Name);
-    rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Child), &kNC_Child);
-    rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Value), &kNC_Value);
-  }
-
-#ifdef DEBUG_alecf
-  printf("nsRDFDataSourceDataSource::Init(%s)\n", uri);
-#endif
-  
-  return NS_OK;
-}
-
-/* void Refresh (in boolean aBlocking); */
-NS_IMETHODIMP nsRDFDataSourceDataSource::Refresh(bool aBlocking)
-{
-    nsCOMPtr<nsIRDFRemoteDataSource> remote =
-        do_QueryInterface(mDataSource);
-    if (remote) {
-        return remote->Refresh(aBlocking);
-    }
-    return NS_OK;
-}
-
-/* void Flush (); */
-NS_IMETHODIMP nsRDFDataSourceDataSource::Flush()
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* void FlushTo (in string aURI); */
-NS_IMETHODIMP nsRDFDataSourceDataSource::FlushTo(const char *aURI)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/**
- * Implement nsIRDFDataSource
- */
-
-/* readonly attribute string URI; */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::GetURI(char * *aURI)
-{
-#ifdef DEBUG_alecf
-  printf("nsRDFDataSourceDataSource::GetURI()\n");
-#endif
-  *aURI = ToNewCString(mURI);
-  
-  return NS_OK;
-}
-
-/* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::GetSource(nsIRDFResource *aProperty,
-                                     nsIRDFNode *aTarget,
-                                     bool aTruthValue,
-                                     nsIRDFResource **_retval)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::GetSources(nsIRDFResource *aProperty,
-                                      nsIRDFNode *aTarget,
-                                      bool aTruthValue,
-                                      nsISimpleEnumerator **_retval)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::GetTarget(nsIRDFResource *aSource,
-                                     nsIRDFResource *aProperty,
-                                     bool aTruthValue,
-                                     nsIRDFNode **_retval)
-{
-#ifdef DEBUG_alecf
-  nsXPIDLCString sourceval;
-  nsXPIDLCString propval;
-  aSource->GetValue(getter_Copies(sourceval));
-  aProperty->GetValue(getter_Copies(propval));
-  printf("GetTarget(%s, %s,..)\n", (const char*)sourceval,
-         (const char*)propval);
-#endif
-
-  return NS_OK;
-}
-
-/* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::GetTargets(nsIRDFResource *aSource,
-                                      nsIRDFResource *aProperty,
-                                      bool aTruthValue,
-                                      nsISimpleEnumerator **_retval)
-{
-  nsXPIDLCString sourceval;
-  aSource->GetValue(getter_Copies(sourceval));
-  nsXPIDLCString propval;
-  aProperty->GetValue(getter_Copies(propval));
-#ifdef DEBUG_alecf
-  printf("GetTargets(%s, %s,..)\n", (const char*)sourceval,
-         (const char*)propval);
-#endif
-  
-  nsresult rv;
-  bool isProp;
-  nsCOMPtr<nsISupportsArray> arcs;
-  nsISimpleEnumerator *enumerator;
-  
-  if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Child, &isProp)) &&
-      isProp) {
-
-    // here we need to determine if we need to extract out the source
-    // or use aSource?
-    if (StringBeginsWith(sourceval, NS_LITERAL_CSTRING("dsresource:"))) {
-      // somehow get the source
-      // XXX ? rv = mDataSource->ArcLabelsOut(realsource, &enumerator);      
-      rv = mDataSource->ArcLabelsOut(aSource, &enumerator);      
-    } else {
-      rv = mDataSource->ArcLabelsOut(aSource, &enumerator);
-    }
-    // enumerate all the children and create the composite resources
-    bool hasMoreArcs=false;
-
-    rv = enumerator->HasMoreElements(&hasMoreArcs);
-    while (NS_SUCCEEDED(rv) && hasMoreArcs) {
-      
-      // get the next arc
-      nsCOMPtr<nsISupports> arcSupports;
-      rv = enumerator->GetNext(getter_AddRefs(arcSupports));
-      nsCOMPtr<nsIRDFResource> arc = do_QueryInterface(arcSupports, &rv);
-
-      // get all the resources on the ends of the arc arcs
-      nsCOMPtr<nsISimpleEnumerator> targetEnumerator;
-      rv = mDataSource->GetTargets(aSource, arc, true,
-                                   getter_AddRefs(targetEnumerator));
-
-      bool hasMoreTargets;
-      rv = targetEnumerator->HasMoreElements(&hasMoreTargets);
-      while (NS_SUCCEEDED(rv) && hasMoreTargets) {
-        // get the next target
-        nsCOMPtr<nsISupports> targetSupports;
-        rv = enumerator->GetNext(getter_AddRefs(targetSupports));
-        nsCOMPtr<nsIRDFResource> target=do_QueryInterface(targetSupports, &rv);
-
-        // now we have an (arc, target) tuple that will be our node
-        // arc will become #Name
-        // target will become #Value
-#ifdef DEBUG_alecf
-        nsXPIDLString arcValue;
-        nsXPIDLString targetValue;
-
-        arc->GetValue(getter_Copies(arcValue));
-        target->GetValue(getter_Copies(targetValue));
-        printf("#child of %s:\n\t%s = %s\n",
-               (const char*)sourceval
-#endif
-
-      }
-      
-      rv = enumerator->HasMoreElements(&hasMoreArcs);
-    }
-    
-  } else if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Name, &isProp)) &&
-             isProp) {
-    if (StringBeginsWith(sourceval, NS_LITERAL_CSTRING("dsresource:"))) {
-      // extract out the name
-
-    }
-    
-  } else if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Value, &isProp)) &&
-             isProp) {
-
-
-  } else {
-    rv = NS_NewISupportsArray(getter_AddRefs(arcs));
-    if (NS_FAILED(rv)) return rv;
-    
-    nsArrayEnumerator* cursor =
-      new nsArrayEnumerator(arcs);
-
-    if (!cursor) return NS_ERROR_OUT_OF_MEMORY;
-    
-    *_retval = cursor;
-    NS_ADDREF(*_retval);
-  }
-  
-  return NS_OK;
-}
-
-/* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* void AddObserver (in nsIRDFObserver aObserver); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::AddObserver(nsIRDFObserver *aObserver)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* void RemoveObserver (in nsIRDFObserver aObserver); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::RemoveObserver(nsIRDFObserver *aObserver)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::ArcLabelsOut(nsIRDFResource *aSource,
-                                        nsISimpleEnumerator **_retval)
-{
-  nsresult rv=NS_OK;
-  
-  nsCOMPtr<nsISupportsArray> arcs;
-  rv = NS_NewISupportsArray(getter_AddRefs(arcs));
-  
-  if (NS_FAILED(rv)) return rv;
-  nsXPIDLCString sourceval;
-  aSource->GetValue(getter_Copies(sourceval));
-  
-#ifdef DEBUG_alecf
-  printf("ArcLabelsOut(%s)\n", (const char*)sourceval);
-#endif
-  
-  arcs->AppendElement(kNC_Name);
-  arcs->AppendElement(kNC_Value);
-  arcs->AppendElement(kNC_Child);
-
-  nsArrayEnumerator* cursor =
-    new nsArrayEnumerator(arcs);
-
-  if (!cursor) return NS_ERROR_OUT_OF_MEMORY;
-  
-  NS_ADDREF(cursor);
-  *_retval = cursor;
-
-  return NS_OK;
-}
-
-/* nsISimpleEnumerator GetAllResources (); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::GetAllResources(nsISimpleEnumerator **_retval)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::IsCommandEnabled(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments, bool *_retval)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::DoCommand(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments)
-{
-  return NS_RDF_NO_VALUE;
-}
-
-/* void beginUpdateBatch (); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::BeginUpdateBatch()
-{
-  return NS_OK;
-}
-
-/* void endUpdateBatch (); */
-NS_IMETHODIMP
-nsRDFDataSourceDataSource::EndUpdateBatch()
-{
-  return NS_OK;
-}
-
-nsresult
-NS_NewRDFDataSourceDataSource(nsISupports *, const nsIID& iid,
-                              void ** result)
-
-{
-  nsRDFDataSourceDataSource * dsds = new nsRDFDataSourceDataSource();
-  if (!dsds) return NS_ERROR_NOT_INITIALIZED;
-  return dsds->QueryInterface(iid, result);
-  
-}
deleted file mode 100644
--- a/rdf/tests/dsds/nsRDFDataSourceDS.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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 __nsRDFDataSourceDS_h
-#define __nsRDFDataSourceDS_h
-
-
-/* {aa1b3f18-1aad-11d3-84bf-006008948010} */
-#define NS_RDFDATASOURCEDATASOURCE_CID \
-  {0xaa1b3f18, 0x1aad, 0x11d3, \
-    {0x84, 0xbf, 0x00, 0x60, 0x08, 0x94, 0x80, 0x10}}
-
-nsresult
-NS_NewRDFDataSourceDataSource(nsISupports* aOuter,
-                              const nsIID& iid, void **result);
-
-#endif
deleted file mode 100644
--- a/rdf/tests/dsds/nsRDFDataSourceFactory.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#include "nsIGenericFactory.h"
-#include "nsRDFDataSourceDS.h"
-#include "nsIComponentManager.h"
-#include "nsIServiceManager.h"
-#include "rdf.h"
-
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-
-static NS_DEFINE_CID(kRDFDataSourceCID, NS_RDFDATASOURCEDATASOURCE_CID);
-static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
-
-nsresult
-NSGetFactory(nsISupports* aServMgr,
-             const nsCID &aClass,
-             const char* aClassName,
-             const char* aContractID,
-             nsIFactory **aFactory)
-{
-  nsresult rv=NS_OK;
-  nsIGenericFactory* fact;
-  if (aClass.Equals(kRDFDataSourceCID))
-    rv = NS_NewGenericFactory(&fact, NS_NewRDFDataSourceDataSource);
-  else
-    rv = NS_ERROR_FAILURE;
-
-  if (NS_SUCCEEDED(rv))
-    *aFactory = fact;
-
-#ifdef DEBUG_alecf
-  printf("nsRDFDataSource's NSGetFactory!\n");
-#endif
-  return rv;
-}
-
-nsresult
-NSRegisterSelf(nsISupports* aServMgr, const char* aPath)
-{
-  nsresult rv;
-  nsCOMPtr<nsIComponentManager> compMgr =
-           do_GetService(kComponentManagerCID, aServMgr, &rv);
-  if (NS_FAILED(rv)) return rv;
-
-  rv = compMgr->RegisterComponent(kRDFDataSourceCID,
-                                  "Generic DataSource DataSource",
-                                  NS_RDF_DATASOURCE_CONTRACTID_PREFIX "datasource",
-                                  aPath, true, true);
-
-  return rv;
-
-}
-
-nsresult
-NSUnregisterSelf(nsISupports* aServMgr, const char* aPath)
-{
-  nsresult rv;
-  nsCOMPtr<nsIComponentManager> compMgr =
-         do_GetService(kComponentManagerCID, aServMgr, &rv);
-  if (NS_FAILED(rv)) return rv;
-
-  rv = compMgr->UnregisterComponent(kRDFDataSourceCID, aPath);
-
-  return rv;
-}
deleted file mode 100644
--- a/rdf/util/src/internal/Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# 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/.
-
-# This makefile builds the version of unicharutils_s static library which uses
-# internal linkage. Components that use frozen (external) linkage should use
-# rdfutil_external_s.
-
-MOZILLA_INTERNAL_API = 1
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/services/crypto/component/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# 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/.
-
-MOZILLA_INTERNAL_API := 1
--- a/toolkit/components/feeds/Makefile.in
+++ b/toolkit/components/feeds/Makefile.in
@@ -1,14 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
 include $(topsrcdir)/config/rules.mk
 
 ABS_SRCDIR := $(abspath $(srcdir))
 ifeq ($(OS_ARCH),WINNT)
 
 check::
 	cd $(srcdir)/test; $(LIBXUL_DIST)/bin/xpcshell$(BIN_SUFFIX) shell.js 
 
deleted file mode 100644
--- a/toolkit/components/url-classifier/tests/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# 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/.
-
-
-MOZILLA_INTERNAL_API = 1
-
-# XXX Get this to work in libxul builds.
-## simple c++ tests (no xpcom)
-#CPP_UNIT_TESTS = \
-#	TestUrlClassifierUtils.cpp \
-#	$(NULL)
--- a/toolkit/components/url-classifier/tests/moz.build
+++ b/toolkit/components/url-classifier/tests/moz.build
@@ -4,8 +4,16 @@
 # 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/.
 
 MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini']
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
 
 JAR_MANIFESTS += ['jar.mn']
+
+#DEFINES['MOZILLA_INTERNAL_API'] = True
+
+# XXX Get this to work in libxul builds.
+## simple c++ tests (no xpcom)
+#CPP_UNIT_TESTS += [ \
+#    'TestUrlClassifierUtils.cpp', \
+#]
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 # This is going to be a framework named "XUL", not an ordinary library named
 # "libxul.dylib"
 SHARED_LIBRARY_NAME=XUL
 # Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
 # setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
 # as-is so that dependencies of the form -ltracemalloc still work.
 MAKE_FRAMEWORK=1
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -15,16 +15,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'nsDllMain.cpp',
     ]
     if not CONFIG['GNU_CC']:
         LOCAL_INCLUDES += [
 	    '/widget/windows',
 	    '/xpcom/base',
 	]
 
+DEFINES['MOZILLA_INTERNAL_API'] = True
+
 # component libraries
 additional_defines = (
     'MOZ_AUTH_EXTENSION',
     'MOZ_GIO_COMPONENT',
     'MOZ_JSDEBUGGER',
     'MOZ_PERMISSIONS',
     'MOZ_PREF_EXTENSIONS',
     'MOZ_SPELLCHECK',
--- a/xpcom/analysis/Makefile.in
+++ b/xpcom/analysis/Makefile.in
@@ -1,14 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
-
 include $(topsrcdir)/config/rules.mk
 
 DUMP_CLASSES = \
   nsAString_internal \
   nsACString_internal \
   $(NULL)
 
 SPACE = $(NULL) $(NULL)
--- a/xpcom/analysis/moz.build
+++ b/xpcom/analysis/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
+DEFINES['MOZILLA_INTERNAL_API'] = True
--- a/xpcom/base/Makefile.in
+++ b/xpcom/base/Makefile.in
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API =1
-
 INSTALL_TARGETS += errorlist
 errorlist_FILES := \
   ErrorListCDefines.h \
   ErrorListCxxDefines.h \
   $(NULL)
 errorlist_DEST = $(DIST)/include
 errorlist_TARGET := export
 
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -153,11 +153,10 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xpcom_core'
 
 LOCAL_INCLUDES += [
     '../build',
     '/xpcom/ds',
 ]
 
-
 if CONFIG['MOZ_OPTIMIZE']:
     DEFINES['MOZ_OPTIMIZE'] = True
--- a/xpcom/build/Makefile.in
+++ b/xpcom/build/Makefile.in
@@ -1,17 +1,15 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
 
-MOZILLA_INTERNAL_API = 1
-
 LOCAL_INCLUDES	= \
 		-I$(srcdir) \
 		-I.. \
 		-I$(srcdir)/../glue \
 		-I$(srcdir)/../base \
 		-I$(srcdir)/../ds \
 		-I$(srcdir)/../io \
 		-I$(srcdir)/../components \
--- a/xpcom/components/Makefile.in
+++ b/xpcom/components/Makefile.in
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
-
 LOCAL_INCLUDES	= \
 	-I$(srcdir)/../reflect/xptinfo/src \
 	-I$(srcdir)/../base \
 	-I$(srcdir)/../ds \
 	-I$(srcdir)/../build \
 	-I.. \
 	-I$(topsrcdir)/chrome/src \
 	-I$(topsrcdir)/modules/libjar \
--- a/xpcom/io/Makefile.in
+++ b/xpcom/io/Makefile.in
@@ -1,8 +1,7 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES	+= -I..
--- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
@@ -1,15 +1,13 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
-
 ######################################################################
 # ARM
 ######################################################################
 #
 # Linux/ARM
 #
 ifeq ($(OS_ARCH),Linux)
 ifneq (,$(filter arm% sa110,$(OS_TEST)))
deleted file mode 100644
--- a/xpcom/reflect/xptcall/src/md/win32/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# 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/.
-
-MOZILLA_INTERNAL_API = 1
--- a/xpcom/string/src/Makefile.in
+++ b/xpcom/string/src/Makefile.in
@@ -1,16 +1,14 @@
 # vim:set ts=8 sw=8 sts=8 noet:
 # 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-MOZILLA_INTERNAL_API = 1
-
 include $(topsrcdir)/config/rules.mk
 
 ifneq (,$(INTEL_ARCHITECTURE))
 # gcc requires -msse2 on nsUTF8UtilsSSE2.cpp since it uses SSE2 intrinsics.
 # (See bug 585538 comment 12.)
 ifdef GNU_CC
 nsUTF8UtilsSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
 endif
--- a/xpcom/tests/moz.build
+++ b/xpcom/tests/moz.build
@@ -65,16 +65,17 @@ CPP_UNIT_TESTS += [
     'TestFile.cpp',
     'TestHashtables.cpp',
     'TestID.cpp',
     'TestObserverArray.cpp',
     'TestObserverService.cpp',
     'TestPipe.cpp',
     'TestPLDHash.cpp',
     'TestRefPtr.cpp',
+    'TestStringAPI.cpp',
     'TestTArray.cpp',
     'TestTextFormatter.cpp',
     'TestThreadUtils.cpp'
 ]
 
 if CONFIG['MOZ_MEMORY']:
     CPP_UNIT_TESTS += [
         'TestJemalloc.cpp',
@@ -108,20 +109,15 @@ if CONFIG['MOZ_MEMORY']:
 if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT', 'Darwin'):
     # FIXME bug 523392: TestDeadlockDetector doesn't like Windows
     # FIXME bug 523378: also fails on OS X
     CPP_UNIT_TESTS += [
         'TestDeadlockDetector.cpp',
         'TestDeadlockDetectorScalability.cpp',
     ]
 
-if not CONFIG['MOZILLA_INTERNAL_API']:
-    CPP_UNIT_TESTS += [
-        'TestStringAPI.cpp',
-    ]
-
 LOCAL_INCLUDES += [
     '../ds',
 ]
 
 RESOURCE_FILES += [
     'test.properties',
 ]