Bug 1459748 - Follow-up: Replace NS_PRECONDITION with NS_ASSERTION after removal in bug 1457813. rs=bustage-fix DONTBUILD
authorJorg K <jorgk@jorgk.com>
Tue, 08 May 2018 19:15:24 +0200
changeset 29708 0719cec3b02019d20a742a39900fd36752188a23
parent 29707 13e2fda05aa3793cde3c1afb06472de6d391e88a
child 29709 7ce8558ff1983d9769c2e933b5a4fa99f100f035
push idunknown
push userunknown
push dateunknown
reviewersbustage-fix
bugs1459748, 1457813
Bug 1459748 - Follow-up: Replace NS_PRECONDITION with NS_ASSERTION after removal in bug 1457813. rs=bustage-fix DONTBUILD
rdf/base/nsCompositeDataSource.cpp
rdf/base/nsContainerEnumerator.cpp
rdf/base/nsDefaultResourceFactory.cpp
rdf/base/nsInMemoryDataSource.cpp
rdf/base/nsRDFContainer.cpp
rdf/base/nsRDFContainerUtils.cpp
rdf/base/nsRDFContentSink.cpp
rdf/base/nsRDFResource.cpp
rdf/base/nsRDFService.cpp
rdf/base/nsRDFXMLDataSource.cpp
rdf/datasource/nsLocalStore.cpp
--- a/rdf/base/nsCompositeDataSource.cpp
+++ b/rdf/base/nsCompositeDataSource.cpp
@@ -157,17 +157,17 @@ CompositeEnumeratorImpl::~CompositeEnume
 
 NS_IMPL_ADDREF(CompositeEnumeratorImpl)
 NS_IMPL_RELEASE(CompositeEnumeratorImpl)
 NS_IMPL_QUERY_INTERFACE(CompositeEnumeratorImpl, nsISimpleEnumerator)
 
 NS_IMETHODIMP
 CompositeEnumeratorImpl::HasMoreElements(bool* aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     // If we've already queued up a next target, then yep, there are
     // more elements.
     if (mResult) {
@@ -568,25 +568,25 @@ CompositeDataSourceImpl::GetSource(nsIRD
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::GetSources(nsIRDFResource* aProperty,
                                     nsIRDFNode* aTarget,
                                     bool aTruthValue,
                                     nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     if (! mAllowNegativeAssertions && ! aTruthValue)
         return(NS_RDF_NO_VALUE);
 
     *aResult = new CompositeAssertionEnumeratorImpl(this, nullptr, aProperty,
                                                     aTarget, aTruthValue,
@@ -601,25 +601,25 @@ CompositeDataSourceImpl::GetSources(nsIR
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::GetTarget(nsIRDFResource* aSource,
                                    nsIRDFResource* aProperty,
                                    bool aTruthValue,
                                    nsIRDFNode** aResult)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     if (! mAllowNegativeAssertions && ! aTruthValue)
         return(NS_RDF_NO_VALUE);
 
     int32_t count = mDataSources.Count();
     for (int32_t i = 0; i < count; ++i) {
@@ -673,25 +673,25 @@ CompositeDataSourceImpl::HasAssertionN(i
 
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::GetTargets(nsIRDFResource* aSource,
                                     nsIRDFResource* aProperty,
                                     bool aTruthValue,
                                     nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     if (! mAllowNegativeAssertions && ! aTruthValue)
         return(NS_RDF_NO_VALUE);
 
     *aResult =
         new CompositeAssertionEnumeratorImpl(this,
@@ -708,25 +708,25 @@ CompositeDataSourceImpl::GetTargets(nsIR
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::Assert(nsIRDFResource* aSource,
                                 nsIRDFResource* aProperty,
                                 nsIRDFNode* aTarget,
                                 bool aTruthValue)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     if (! mAllowNegativeAssertions && ! aTruthValue)
         return(NS_RDF_ASSERTION_REJECTED);
 
     nsresult rv;
 
@@ -748,25 +748,25 @@ CompositeDataSourceImpl::Assert(nsIRDFRe
     return NS_RDF_ASSERTION_REJECTED;
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::Unassert(nsIRDFResource* aSource,
                                   nsIRDFResource* aProperty,
                                   nsIRDFNode* aTarget)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     // Iterate through each of the datasources, starting with "the
     // most local" and moving to "the most remote". If _any_ of the
     // datasources have the assertion, attempt to unassert it.
@@ -814,29 +814,29 @@ CompositeDataSourceImpl::Unassert(nsIRDF
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::Change(nsIRDFResource* aSource,
                                 nsIRDFResource* aProperty,
                                 nsIRDFNode* aOldTarget,
                                 nsIRDFNode* aNewTarget)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aOldTarget != nullptr, "null ptr");
+    NS_ASSERTION(aOldTarget != nullptr, "null ptr");
     if (! aOldTarget)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aNewTarget != nullptr, "null ptr");
+    NS_ASSERTION(aNewTarget != nullptr, "null ptr");
     if (! aNewTarget)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     // XXX So we're assuming that a datasource _must_ accept the
     // atomic change; i.e., we can't split it up across two
     // datasources. That sucks.
@@ -858,29 +858,29 @@ CompositeDataSourceImpl::Change(nsIRDFRe
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::Move(nsIRDFResource* aOldSource,
                               nsIRDFResource* aNewSource,
                               nsIRDFResource* aProperty,
                               nsIRDFNode* aTarget)
 {
-    NS_PRECONDITION(aOldSource != nullptr, "null ptr");
+    NS_ASSERTION(aOldSource != nullptr, "null ptr");
     if (! aOldSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aNewSource != nullptr, "null ptr");
+    NS_ASSERTION(aNewSource != nullptr, "null ptr");
     if (! aNewSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     // XXX So we're assuming that a datasource _must_ accept the
     // atomic move; i.e., we can't split it up across two
     // datasources. That sucks.
@@ -904,25 +904,25 @@ CompositeDataSourceImpl::Move(nsIRDFReso
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::HasAssertion(nsIRDFResource* aSource,
                                       nsIRDFResource* aProperty,
                                       nsIRDFNode* aTarget,
                                       bool aTruthValue,
                                       bool* aResult)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     if (! mAllowNegativeAssertions && ! aTruthValue)
     {
         *aResult = false;
         return(NS_OK);
     }
@@ -957,30 +957,30 @@ CompositeDataSourceImpl::HasAssertion(ns
     // If we get here, nobody had the assertion at all
     *aResult = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::AddObserver(nsIRDFObserver* aObserver)
 {
-    NS_PRECONDITION(aObserver != nullptr, "null ptr");
+    NS_ASSERTION(aObserver != nullptr, "null ptr");
     if (! aObserver)
         return NS_ERROR_NULL_POINTER;
 
     // XXX ensure uniqueness?
     mObservers.AppendObject(aObserver);
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::RemoveObserver(nsIRDFObserver* aObserver)
 {
-    NS_PRECONDITION(aObserver != nullptr, "null ptr");
+    NS_ASSERTION(aObserver != nullptr, "null ptr");
     if (! aObserver)
         return NS_ERROR_NULL_POINTER;
 
     mObservers.RemoveObject(aObserver);
 
     return NS_OK;
 }
 
@@ -1012,21 +1012,21 @@ CompositeDataSourceImpl::HasArcOut(nsIRD
             return NS_OK;
     }
     return NS_OK;
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::ArcLabelsIn(nsIRDFNode* aTarget, nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     nsISimpleEnumerator* result =
         new CompositeArcsInOutEnumeratorImpl(this, aTarget,
                                              CompositeArcsInOutEnumeratorImpl::eArcsIn,
                                              mAllowNegativeAssertions,
                                              mCoalesceDuplicateArcs);
@@ -1038,21 +1038,21 @@ CompositeDataSourceImpl::ArcLabelsIn(nsI
     *aResult = result;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 CompositeDataSourceImpl::ArcLabelsOut(nsIRDFResource* aSource,
                                       nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     nsISimpleEnumerator* result =
         new CompositeArcsInOutEnumeratorImpl(this, aSource,
                                              CompositeArcsInOutEnumeratorImpl::eArcsOut,
                                              mAllowNegativeAssertions,
                                              mCoalesceDuplicateArcs);
--- a/rdf/base/nsContainerEnumerator.cpp
+++ b/rdf/base/nsContainerEnumerator.cpp
@@ -108,17 +108,17 @@ ContainerEnumeratorImpl::~ContainerEnume
 }
 
 NS_IMPL_ISUPPORTS(ContainerEnumeratorImpl, nsISimpleEnumerator)
 
 
 NS_IMETHODIMP
 ContainerEnumeratorImpl::HasMoreElements(bool* aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     // If we've already queued up a next value, then we know there are more elements.
     if (mResult) {
         *aResult = true;
@@ -230,25 +230,25 @@ ContainerEnumeratorImpl::GetNext(nsISupp
 
 ////////////////////////////////////////////////////////////////////////
 
 nsresult
 NS_NewContainerEnumerator(nsIRDFDataSource* aDataSource,
                           nsIRDFResource* aContainer,
                           nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aContainer != nullptr, "null ptr");
+    NS_ASSERTION(aContainer != nullptr, "null ptr");
     if (! aContainer)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     ContainerEnumeratorImpl* result = new ContainerEnumeratorImpl(aDataSource, aContainer);
     if (! result)
         return NS_ERROR_OUT_OF_MEMORY;
 
     NS_ADDREF(result);
--- a/rdf/base/nsDefaultResourceFactory.cpp
+++ b/rdf/base/nsDefaultResourceFactory.cpp
@@ -11,17 +11,17 @@
 
  */
 
 #include "nsRDFResource.h"
 
 nsresult
 NS_NewDefaultResource(nsIRDFResource** aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     nsRDFResource* resource = new nsRDFResource();
     if (! resource)
         return NS_ERROR_OUT_OF_MEMORY;
 
     NS_ADDREF(resource);
--- a/rdf/base/nsInMemoryDataSource.cpp
+++ b/rdf/base/nsInMemoryDataSource.cpp
@@ -593,17 +593,17 @@ InMemoryArcsEnumeratorImpl::~InMemoryArc
 
 NS_IMPL_ADDREF(InMemoryArcsEnumeratorImpl)
 NS_IMPL_RELEASE(InMemoryArcsEnumeratorImpl)
 NS_IMPL_QUERY_INTERFACE(InMemoryArcsEnumeratorImpl, nsISimpleEnumerator)
 
 NS_IMETHODIMP
 InMemoryArcsEnumeratorImpl::HasMoreElements(bool* aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     if (mCurrent) {
         *aResult = true;
         return NS_OK;
     }
 
@@ -686,17 +686,17 @@ InMemoryArcsEnumeratorImpl::GetNext(nsIS
 
 
 ////////////////////////////////////////////////////////////////////////
 // InMemoryDataSource
 
 nsresult
 NS_NewRDFInMemoryDataSource(nsISupports* aOuter, const nsIID& aIID, void** aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
     *aResult = nullptr;
 
     if (aOuter && !aIID.Equals(NS_GET_IID(nsISupports))) {
         NS_ERROR("aggregation requires nsISupports");
         return NS_ERROR_ILLEGAL_VALUE;
     }
@@ -833,25 +833,25 @@ InMemoryDataSource::GetURI(nsACString& a
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::GetSource(nsIRDFResource* property,
                               nsIRDFNode* target,
                               bool tv,
                               nsIRDFResource** source)
 {
-    NS_PRECONDITION(source != nullptr, "null ptr");
+    NS_ASSERTION(source != nullptr, "null ptr");
     if (! source)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(property != nullptr, "null ptr");
+    NS_ASSERTION(property != nullptr, "null ptr");
     if (! property)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(target != nullptr, "null ptr");
+    NS_ASSERTION(target != nullptr, "null ptr");
     if (! target)
         return NS_ERROR_NULL_POINTER;
 
     for (Assertion* as = GetReverseArcs(target); as; as = as->u.as.mInvNext) {
         if ((property == as->u.as.mProperty) && (tv == as->u.as.mTruthValue)) {
             *source = as->mSource;
             NS_ADDREF(*source);
             return NS_OK;
@@ -862,25 +862,25 @@ InMemoryDataSource::GetSource(nsIRDFReso
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::GetTarget(nsIRDFResource* source,
                               nsIRDFResource* property,
                               bool tv,
                               nsIRDFNode** target)
 {
-    NS_PRECONDITION(source != nullptr, "null ptr");
+    NS_ASSERTION(source != nullptr, "null ptr");
     if (! source)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(property != nullptr, "null ptr");
+    NS_ASSERTION(property != nullptr, "null ptr");
     if (! property)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(target != nullptr, "null ptr");
+    NS_ASSERTION(target != nullptr, "null ptr");
     if (! target)
         return NS_ERROR_NULL_POINTER;
 
     Assertion *as = GetForwardArcs(source);
     if (as && as->mHashEntry) {
         PLDHashEntryHdr* hdr = as->u.hash.mPropertyHash->Search(property);
         Assertion* val = hdr ? static_cast<Entry*>(hdr)->mAssertions : nullptr;
         while (val) {
@@ -958,25 +958,25 @@ InMemoryDataSource::HasAssertion(nsIRDFR
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::GetSources(nsIRDFResource* aProperty,
                                nsIRDFNode* aTarget,
                                bool aTruthValue,
                                nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     InMemoryAssertionEnumeratorImpl* result =
         new InMemoryAssertionEnumeratorImpl(this, nullptr, aProperty,
                                             aTarget, aTruthValue);
 
     if (! result)
@@ -989,25 +989,25 @@ InMemoryDataSource::GetSources(nsIRDFRes
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::GetTargets(nsIRDFResource* aSource,
                                nsIRDFResource* aProperty,
                                bool aTruthValue,
                                nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     InMemoryAssertionEnumeratorImpl* result =
         new InMemoryAssertionEnumeratorImpl(this, aSource, aProperty,
                                             nullptr, aTruthValue);
 
     if (! result)
@@ -1113,25 +1113,25 @@ InMemoryDataSource::LockedAssert(nsIRDFR
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::Assert(nsIRDFResource* aSource,
                            nsIRDFResource* aProperty,
                            nsIRDFNode* aTarget,
                            bool aTruthValue)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     if (mReadCount) {
         NS_WARNING("Writing to InMemoryDataSource during read\n");
         return NS_RDF_ASSERTION_REJECTED;
     }
 
@@ -1268,25 +1268,25 @@ InMemoryDataSource::LockedUnassert(nsIRD
     return NS_OK;
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::Unassert(nsIRDFResource* aSource,
                              nsIRDFResource* aProperty,
                              nsIRDFNode* aTarget)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     if (mReadCount) {
         NS_WARNING("Writing to InMemoryDataSource during read\n");
         return NS_RDF_ASSERTION_REJECTED;
     }
 
@@ -1313,29 +1313,29 @@ InMemoryDataSource::Unassert(nsIRDFResou
 
 
 NS_IMETHODIMP
 InMemoryDataSource::Change(nsIRDFResource* aSource,
                            nsIRDFResource* aProperty,
                            nsIRDFNode* aOldTarget,
                            nsIRDFNode* aNewTarget)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aOldTarget != nullptr, "null ptr");
+    NS_ASSERTION(aOldTarget != nullptr, "null ptr");
     if (! aOldTarget)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aNewTarget != nullptr, "null ptr");
+    NS_ASSERTION(aNewTarget != nullptr, "null ptr");
     if (! aNewTarget)
         return NS_ERROR_NULL_POINTER;
 
     if (mReadCount) {
         NS_WARNING("Writing to InMemoryDataSource during read\n");
         return NS_RDF_ASSERTION_REJECTED;
     }
 
@@ -1368,29 +1368,29 @@ InMemoryDataSource::Change(nsIRDFResourc
 
 
 NS_IMETHODIMP
 InMemoryDataSource::Move(nsIRDFResource* aOldSource,
                          nsIRDFResource* aNewSource,
                          nsIRDFResource* aProperty,
                          nsIRDFNode* aTarget)
 {
-    NS_PRECONDITION(aOldSource != nullptr, "null ptr");
+    NS_ASSERTION(aOldSource != nullptr, "null ptr");
     if (! aOldSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aNewSource != nullptr, "null ptr");
+    NS_ASSERTION(aNewSource != nullptr, "null ptr");
     if (! aNewSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     if (mReadCount) {
         NS_WARNING("Writing to InMemoryDataSource during read\n");
         return NS_RDF_ASSERTION_REJECTED;
     }
 
@@ -1420,30 +1420,30 @@ InMemoryDataSource::Move(nsIRDFResource*
 
     return NS_RDF_ASSERTION_ACCEPTED;
 }
 
 
 NS_IMETHODIMP
 InMemoryDataSource::AddObserver(nsIRDFObserver* aObserver)
 {
-    NS_PRECONDITION(aObserver != nullptr, "null ptr");
+    NS_ASSERTION(aObserver != nullptr, "null ptr");
     if (! aObserver)
         return NS_ERROR_NULL_POINTER;
 
     mObservers.AppendObject(aObserver);
     mNumObservers = mObservers.Count();
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::RemoveObserver(nsIRDFObserver* aObserver)
 {
-    NS_PRECONDITION(aObserver != nullptr, "null ptr");
+    NS_ASSERTION(aObserver != nullptr, "null ptr");
     if (! aObserver)
         return NS_ERROR_NULL_POINTER;
 
     mObservers.RemoveObject(aObserver);
     // note: use Count() instead of just decrementing
     // in case aObserver wasn't in list, for example
     mNumObservers = mObservers.Count();
 
@@ -1489,17 +1489,17 @@ InMemoryDataSource::HasArcOut(nsIRDFReso
     }
     *result = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::ArcLabelsIn(nsIRDFNode* aTarget, nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     InMemoryArcsEnumeratorImpl* result =
         new InMemoryArcsEnumeratorImpl(this, nullptr, aTarget);
 
     if (! result)
         return NS_ERROR_OUT_OF_MEMORY;
@@ -1508,17 +1508,17 @@ InMemoryDataSource::ArcLabelsIn(nsIRDFNo
     *aResult = result;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 InMemoryDataSource::ArcLabelsOut(nsIRDFResource* aSource, nsISimpleEnumerator** aResult)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
     InMemoryArcsEnumeratorImpl* result =
         new InMemoryArcsEnumeratorImpl(this, aSource, nullptr);
 
     if (! result)
         return NS_ERROR_OUT_OF_MEMORY;
@@ -1663,25 +1663,25 @@ InMemoryDataSource::SetPropagateChanges(
 
 NS_IMETHODIMP
 InMemoryDataSource::Mark(nsIRDFResource* aSource,
                          nsIRDFResource* aProperty,
                          nsIRDFNode* aTarget,
                          bool aTruthValue,
                          bool* aDidMark)
 {
-    NS_PRECONDITION(aSource != nullptr, "null ptr");
+    NS_ASSERTION(aSource != nullptr, "null ptr");
     if (! aSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aTarget != nullptr, "null ptr");
+    NS_ASSERTION(aTarget != nullptr, "null ptr");
     if (! aTarget)
         return NS_ERROR_NULL_POINTER;
 
     Assertion *as = GetForwardArcs(aSource);
     if (as && as->mHashEntry) {
         PLDHashEntryHdr* hdr = as->u.hash.mPropertyHash->Search(aProperty);
         Assertion* val = hdr ? static_cast<Entry*>(hdr)->mAssertions : nullptr;
         while (val) {
--- a/rdf/base/nsRDFContainer.cpp
+++ b/rdf/base/nsRDFContainer.cpp
@@ -110,21 +110,21 @@ RDFContainerImpl::GetResource(nsIRDFReso
     NS_IF_ADDREF(*_retval);
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFContainerImpl::Init(nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aContainer != nullptr, "null ptr");
+    NS_ASSERTION(aContainer != nullptr, "null ptr");
     if (! aContainer)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
     bool isContainer;
     rv = gRDFContainerUtils->IsContainer(aDataSource, aContainer, &isContainer);
     if (NS_FAILED(rv)) return rv;
 
@@ -200,17 +200,17 @@ RDFContainerImpl::GetElements(nsISimpleE
 
 
 NS_IMETHODIMP
 RDFContainerImpl::AppendElement(nsIRDFNode *aElement)
 {
     if (!mDataSource || !mContainer)
         return NS_ERROR_NOT_INITIALIZED;
 
-    NS_PRECONDITION(aElement != nullptr, "null ptr");
+    NS_ASSERTION(aElement != nullptr, "null ptr");
     if (! aElement)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     nsCOMPtr<nsIRDFResource> nextVal;
     rv = GetNextValue(getter_AddRefs(nextVal));
     if (NS_FAILED(rv)) return rv;
@@ -223,17 +223,17 @@ RDFContainerImpl::AppendElement(nsIRDFNo
 
 
 NS_IMETHODIMP
 RDFContainerImpl::RemoveElement(nsIRDFNode *aElement, bool aRenumber)
 {
     if (!mDataSource || !mContainer)
         return NS_ERROR_NOT_INITIALIZED;
 
-    NS_PRECONDITION(aElement != nullptr, "null ptr");
+    NS_ASSERTION(aElement != nullptr, "null ptr");
     if (! aElement)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     int32_t idx;
     rv = IndexOf(aElement, &idx);
     if (NS_FAILED(rv)) return rv;
@@ -263,21 +263,21 @@ RDFContainerImpl::RemoveElement(nsIRDFNo
 
 
 NS_IMETHODIMP
 RDFContainerImpl::InsertElementAt(nsIRDFNode *aElement, int32_t aIndex, bool aRenumber)
 {
     if (!mDataSource || !mContainer)
         return NS_ERROR_NOT_INITIALIZED;
 
-    NS_PRECONDITION(aElement != nullptr, "null ptr");
+    NS_ASSERTION(aElement != nullptr, "null ptr");
     if (! aElement)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aIndex >= 1, "illegal value");
+    NS_ASSERTION(aIndex >= 1, "illegal value");
     if (aIndex < 1)
         return NS_ERROR_ILLEGAL_VALUE;
 
     nsresult rv;
 
     int32_t count;
     rv = GetCount(&count);
     if (NS_FAILED(rv)) return rv;
--- a/rdf/base/nsRDFContainerUtils.cpp
+++ b/rdf/base/nsRDFContainerUtils.cpp
@@ -71,17 +71,17 @@ const char      RDFContainerUtilsImpl::k
 NS_IMPL_ISUPPORTS(RDFContainerUtilsImpl, nsIRDFContainerUtils)
 
 ////////////////////////////////////////////////////////////////////////
 // nsIRDFContainerUtils interface
 
 NS_IMETHODIMP
 RDFContainerUtilsImpl::IsOrdinalProperty(nsIRDFResource *aProperty, bool *_retval)
 {
-    NS_PRECONDITION(aProperty != nullptr, "null ptr");
+    NS_ASSERTION(aProperty != nullptr, "null ptr");
     if (! aProperty)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     const char	*propertyStr;
     rv = aProperty->GetValueConst( &propertyStr );
     if (NS_FAILED(rv)) return rv;
@@ -111,17 +111,17 @@ RDFContainerUtilsImpl::IsOrdinalProperty
     *_retval = true;
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFContainerUtilsImpl::IndexToOrdinalResource(int32_t aIndex, nsIRDFResource **aOrdinal)
 {
-    NS_PRECONDITION(aIndex > 0, "illegal value");
+    NS_ASSERTION(aIndex > 0, "illegal value");
     if (aIndex <= 0)
         return NS_ERROR_ILLEGAL_VALUE;
 
     nsAutoCString uri(kRDFNameSpaceURI);
     uri.Append('_');
     uri.AppendInt(aIndex);
 
     nsresult rv = gRDFService->GetResource(uri, aOrdinal);
@@ -130,17 +130,17 @@ RDFContainerUtilsImpl::IndexToOrdinalRes
 
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFContainerUtilsImpl::OrdinalResourceToIndex(nsIRDFResource *aOrdinal, int32_t *aIndex)
 {
-    NS_PRECONDITION(aOrdinal != nullptr, "null ptr");
+    NS_ASSERTION(aOrdinal != nullptr, "null ptr");
     if (! aOrdinal)
         return NS_ERROR_NULL_POINTER;
 
     const char	*ordinalStr;
     if (NS_FAILED(aOrdinal->GetValueConst( &ordinalStr )))
         return NS_ERROR_FAILURE;
 
     const char* s = ordinalStr;
@@ -172,25 +172,25 @@ RDFContainerUtilsImpl::OrdinalResourceTo
 
     *aIndex = idx;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFContainerUtilsImpl::IsContainer(nsIRDFDataSource *aDataSource, nsIRDFResource *aResource, bool *_retval)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(_retval != nullptr, "null ptr");
+    NS_ASSERTION(_retval != nullptr, "null ptr");
     if (! _retval)
         return NS_ERROR_NULL_POINTER;
 
     if (IsA(aDataSource, aResource, kRDF_Seq) ||
         IsA(aDataSource, aResource, kRDF_Bag) ||
         IsA(aDataSource, aResource, kRDF_Alt)) {
         *_retval = true;
     }
@@ -229,65 +229,65 @@ RDFContainerUtilsImpl::IsEmpty(nsIRDFDat
 
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFContainerUtilsImpl::IsBag(nsIRDFDataSource *aDataSource, nsIRDFResource *aResource, bool *_retval)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(_retval != nullptr, "null ptr");
+    NS_ASSERTION(_retval != nullptr, "null ptr");
     if (! _retval)
         return NS_ERROR_NULL_POINTER;
 
     *_retval = IsA(aDataSource, aResource, kRDF_Bag);
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFContainerUtilsImpl::IsSeq(nsIRDFDataSource *aDataSource, nsIRDFResource *aResource, bool *_retval)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(_retval != nullptr, "null ptr");
+    NS_ASSERTION(_retval != nullptr, "null ptr");
     if (! _retval)
         return NS_ERROR_NULL_POINTER;
 
     *_retval = IsA(aDataSource, aResource, kRDF_Seq);
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFContainerUtilsImpl::IsAlt(nsIRDFDataSource *aDataSource, nsIRDFResource *aResource, bool *_retval)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(_retval != nullptr, "null ptr");
+    NS_ASSERTION(_retval != nullptr, "null ptr");
     if (! _retval)
         return NS_ERROR_NULL_POINTER;
 
     *_retval = IsA(aDataSource, aResource, kRDF_Alt);
     return NS_OK;
 }
 
 
@@ -360,17 +360,17 @@ RDFContainerUtilsImpl::~RDFContainerUtil
     }
 }
 
 
 
 nsresult
 NS_NewRDFContainerUtils(nsIRDFContainerUtils** aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     RDFContainerUtilsImpl* result =
         new RDFContainerUtilsImpl();
 
     if (! result)
         return NS_ERROR_OUT_OF_MEMORY;
@@ -379,23 +379,23 @@ NS_NewRDFContainerUtils(nsIRDFContainerU
     *aResult = result;
     return NS_OK;
 }
 
 
 nsresult
 RDFContainerUtilsImpl::MakeContainer(nsIRDFDataSource* aDataSource, nsIRDFResource* aResource, nsIRDFResource* aType, nsIRDFContainer** aResult)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)	return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)	return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aType != nullptr, "null ptr");
+    NS_ASSERTION(aType != nullptr, "null ptr");
     if (! aType)	return NS_ERROR_NULL_POINTER;
 
     if (aResult)	*aResult = nullptr;
 
     nsresult rv;
 
     // Check to see if somebody has already turned it into a container; if so
     // don't try to do it again.
--- a/rdf/base/nsRDFContentSink.cpp
+++ b/rdf/base/nsRDFContentSink.cpp
@@ -320,17 +320,17 @@ RDFContentSinkImpl::~RDFContentSinkImpl(
 // nsISupports interface
 
 NS_IMPL_ADDREF(RDFContentSinkImpl)
 NS_IMPL_RELEASE(RDFContentSinkImpl)
 
 NS_IMETHODIMP
 RDFContentSinkImpl::QueryInterface(REFNSIID iid, void** result)
 {
-    NS_PRECONDITION(result, "null ptr");
+    NS_ASSERTION(result, "null ptr");
     if (! result)
         return NS_ERROR_NULL_POINTER;
 
     NS_DEFINE_IID(kIContentSinkIID,    NS_ICONTENT_SINK_IID);
     NS_DEFINE_IID(kIExpatSinkIID,      NS_IEXPATSINK_IID);
     NS_DEFINE_IID(kISupportsIID,       NS_ISUPPORTS_IID);
     NS_DEFINE_IID(kIXMLContentSinkIID, NS_IXMLCONTENT_SINK_IID);
     NS_DEFINE_IID(kIRDFContentSinkIID, NS_IRDFCONTENTSINK_IID);
@@ -491,17 +491,17 @@ RDFContentSinkImpl::HandleXMLDeclaration
 }
 
 NS_IMETHODIMP
 RDFContentSinkImpl::ReportError(const char16_t* aErrorText,
                                 const char16_t* aSourceText,
                                 nsIScriptError *aError,
                                 bool *_retval)
 {
-  NS_PRECONDITION(aError && aSourceText && aErrorText, "Check arguments!!!");
+  NS_ASSERTION(aError && aSourceText && aErrorText, "Check arguments!!!");
 
   // The expat driver should report the error.
   *_retval = true;
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////
 // nsIContentSink interface
@@ -564,29 +564,29 @@ RDFContentSinkImpl::SetParser(nsParserBa
 }
 
 ////////////////////////////////////////////////////////////////////////
 // nsIRDFContentSink interface
 
 NS_IMETHODIMP
 RDFContentSinkImpl::Init(nsIURI* aURL)
 {
-    NS_PRECONDITION(aURL != nullptr, "null ptr");
+    NS_ASSERTION(aURL != nullptr, "null ptr");
     if (! aURL)
         return NS_ERROR_NULL_POINTER;
 
     mDocumentURL = aURL;
     mState = eRDFContentSinkState_InProlog;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFContentSinkImpl::SetDataSource(nsIRDFDataSource* aDataSource)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "SetDataSource null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "SetDataSource null ptr");
     mDataSource = aDataSource;
     NS_ASSERTION(mDataSource != nullptr,"Couldn't QI RDF DataSource");
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFContentSinkImpl::GetDataSource(nsIRDFDataSource*& aDataSource)
@@ -1425,17 +1425,17 @@ RDFContentSinkImpl::PopContext(nsIRDFRes
 }
 
 
 ////////////////////////////////////////////////////////////////////////
 
 nsresult
 NS_NewRDFContentSink(nsIRDFContentSink** aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     RDFContentSinkImpl* sink = new RDFContentSinkImpl();
     if (! sink)
         return NS_ERROR_OUT_OF_MEMORY;
 
     NS_ADDREF(sink);
--- a/rdf/base/nsRDFResource.cpp
+++ b/rdf/base/nsRDFResource.cpp
@@ -45,17 +45,17 @@ nsRDFResource::~nsRDFResource(void)
 NS_IMPL_ISUPPORTS(nsRDFResource, nsIRDFResource, nsIRDFNode)
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIRDFNode methods:
 
 NS_IMETHODIMP
 nsRDFResource::EqualsNode(nsIRDFNode* aNode, bool* aResult)
 {
-    NS_PRECONDITION(aNode != nullptr, "null ptr");
+    NS_ASSERTION(aNode != nullptr, "null ptr");
     if (! aNode)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
     nsIRDFResource* resource;
     rv = aNode->QueryInterface(NS_GET_IID(nsIRDFResource), (void**)&resource);
     if (NS_SUCCEEDED(rv)) {
         *aResult = (static_cast<nsIRDFResource*>(this) == resource);
@@ -71,17 +71,17 @@ nsRDFResource::EqualsNode(nsIRDFNode* aN
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIRDFResource methods:
 
 NS_IMETHODIMP
 nsRDFResource::Init(const char* aURI)
 {
-    NS_PRECONDITION(aURI != nullptr, "null ptr");
+    NS_ASSERTION(aURI != nullptr, "null ptr");
     if (! aURI)
         return NS_ERROR_NULL_POINTER;
 
     mURI = aURI;
 
     if (gRDFServiceRefCnt++ == 0) {
         nsresult rv = CallGetService(kRDFServiceCID, &gRDFService);
         if (NS_FAILED(rv)) return rv;
@@ -116,30 +116,30 @@ nsRDFResource::GetValueConst(const char*
 {
     *aURI = mURI.get();
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsRDFResource::EqualsString(const char* aURI, bool* aResult)
 {
-    NS_PRECONDITION(aURI != nullptr, "null ptr");
+    NS_ASSERTION(aURI != nullptr, "null ptr");
     if (! aURI)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aResult, "null ptr");
+    NS_ASSERTION(aResult, "null ptr");
 
     *aResult = mURI.Equals(aURI);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsRDFResource::GetDelegate(const char* aKey, REFNSIID aIID, void** aResult)
 {
-    NS_PRECONDITION(aKey != nullptr, "null ptr");
+    NS_ASSERTION(aKey != nullptr, "null ptr");
     if (! aKey)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
     *aResult = nullptr;
 
     DelegateEntry* entry = mDelegates;
     while (entry) {
@@ -188,17 +188,17 @@ nsRDFResource::GetDelegate(const char* a
     mDelegates = entry;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsRDFResource::ReleaseDelegate(const char* aKey)
 {
-    NS_PRECONDITION(aKey != nullptr, "null ptr");
+    NS_ASSERTION(aKey != nullptr, "null ptr");
     if (! aKey)
         return NS_ERROR_NULL_POINTER;
 
     DelegateEntry* entry = mDelegates;
     DelegateEntry** link = &mDelegates;
 
     while (entry) {
         if (entry->mKey.Equals(aKey)) {
--- a/rdf/base/nsRDFService.cpp
+++ b/rdf/base/nsRDFService.cpp
@@ -799,18 +799,18 @@ IsLegalSchemeCharacter(const char aChar)
     return bool((mask & bit) != 0);
 }
 
 
 NS_IMETHODIMP
 RDFServiceImpl::GetResource(const nsACString& aURI, nsIRDFResource** aResource)
 {
     // Sanity checks
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
-    NS_PRECONDITION(!aURI.IsEmpty(), "URI is empty");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(!aURI.IsEmpty(), "URI is empty");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
     if (aURI.IsEmpty())
         return NS_ERROR_INVALID_ARG;
 
     const nsCString& flatURI = PromiseFlatCString(aURI);
     MOZ_LOG(gLog, LogLevel::Debug, ("rdfserv get-resource %s", flatURI.get()));
 
@@ -970,21 +970,21 @@ static int32_t kShift = 6;
 
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFServiceImpl::GetLiteral(const char16_t* aValue, nsIRDFLiteral** aLiteral)
 {
-    NS_PRECONDITION(aValue != nullptr, "null ptr");
+    NS_ASSERTION(aValue != nullptr, "null ptr");
     if (! aValue)
         return NS_ERROR_NULL_POINTER;
 
-    NS_PRECONDITION(aLiteral != nullptr, "null ptr");
+    NS_ASSERTION(aLiteral != nullptr, "null ptr");
     if (! aLiteral)
         return NS_ERROR_NULL_POINTER;
 
     // See if we have one already cached
     PLDHashEntryHdr *hdr = mLiterals.Search(aValue);
     if (hdr) {
         LiteralHashEntry *entry = static_cast<LiteralHashEntry *>(hdr);
         NS_ADDREF(*aLiteral = entry->mLiteral);
@@ -1052,17 +1052,17 @@ RDFServiceImpl::GetBlobLiteral(const uin
 
     NS_ADDREF(*aResult = result);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFServiceImpl::IsAnonymousResource(nsIRDFResource* aResource, bool* _result)
 {
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     const char* uri;
     rv = aResource->GetValueConst(&uri);
     if (NS_FAILED(rv)) return rv;
@@ -1080,17 +1080,17 @@ RDFServiceImpl::IsAnonymousResource(nsIR
     }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFServiceImpl::RegisterResource(nsIRDFResource* aResource, bool aReplace)
 {
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     const char* uri;
     rv = aResource->GetValueConst(&uri);
     NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get URI from resource");
@@ -1135,17 +1135,17 @@ RDFServiceImpl::RegisterResource(nsIRDFR
     entry->mKey = uri;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFServiceImpl::UnregisterResource(nsIRDFResource* aResource)
 {
-    NS_PRECONDITION(aResource != nullptr, "null ptr");
+    NS_ASSERTION(aResource != nullptr, "null ptr");
     if (! aResource)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     const char* uri;
     rv = aResource->GetValueConst(&uri);
     if (NS_FAILED(rv)) return rv;
@@ -1165,17 +1165,17 @@ RDFServiceImpl::UnregisterResource(nsIRD
 
     mResources.Remove(uri);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFServiceImpl::RegisterDataSource(nsIRDFDataSource* aDataSource, bool aReplace)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     nsAutoCString uri;
     rv = aDataSource->GetURI(uri);
     if (NS_FAILED(rv)) return rv;
@@ -1214,17 +1214,17 @@ RDFServiceImpl::RegisterDataSource(nsIRD
     }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFServiceImpl::UnregisterDataSource(nsIRDFDataSource* aDataSource)
 {
-    NS_PRECONDITION(aDataSource != nullptr, "null ptr");
+    NS_ASSERTION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     nsAutoCString uri;
     rv = aDataSource->GetURI(uri);
     if (NS_FAILED(rv)) return rv;
@@ -1268,17 +1268,17 @@ RDFServiceImpl::GetDataSourceBlocking(co
 {
     // Use GetDataSource and ask for a blocking Refresh.
     return GetDataSource( aURI, true, aDataSource );
 }
 
 nsresult
 RDFServiceImpl::GetDataSource(const char* aURI, bool aBlock, nsIRDFDataSource** aDataSource)
 {
-    NS_PRECONDITION(aURI != nullptr, "null ptr");
+    NS_ASSERTION(aURI != nullptr, "null ptr");
     if (! aURI)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
     // Attempt to canonify the URI before we look for it in the
     // cache. We won't bother doing this on `rdf:' URIs to avoid
     // useless (and expensive) protocol handler lookups.
--- a/rdf/base/nsRDFXMLDataSource.cpp
+++ b/rdf/base/nsRDFXMLDataSource.cpp
@@ -363,17 +363,17 @@ static const char kFileURIPrefix[] = "fi
 static const char kResourceURIPrefix[] = "resource:";
 
 
 //----------------------------------------------------------------------
 
 nsresult
 NS_NewRDFXMLDataSource(nsIRDFDataSource** aResult)
 {
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     RDFXMLDataSourceImpl* datasource = new RDFXMLDataSourceImpl();
     if (! datasource)
         return NS_ERROR_OUT_OF_MEMORY;
 
     nsresult rv;
@@ -567,17 +567,17 @@ RDFXMLDataSourceImpl::GetLoaded(bool* _r
 {
     *_result = (mLoadState == eLoadState_Loaded);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 RDFXMLDataSourceImpl::Init(const char* uri)
 {
-    NS_PRECONDITION(mInner != nullptr, "not initialized");
+    NS_ASSERTION(mInner != nullptr, "not initialized");
     if (! mInner)
         return NS_ERROR_OUT_OF_MEMORY;
 
     nsresult rv;
 
     rv = NS_NewURI(getter_AddRefs(mURL), nsDependentCString(uri));
     if (NS_FAILED(rv)) return rv;
 
@@ -780,17 +780,17 @@ RDFXMLDataSourceImpl::rdfXMLFlush(nsIURI
 
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 RDFXMLDataSourceImpl::FlushTo(const char *aURI)
 {
-    NS_PRECONDITION(aURI != nullptr, "not initialized");
+    NS_ASSERTION(aURI != nullptr, "not initialized");
     if (!aURI)
         return NS_ERROR_NULL_POINTER;
 
     // XXX this is a hack: any "file:" URI is considered writable. All
     // others are considered read-only.
     if ((PL_strncmp(aURI, kFileURIPrefix, sizeof(kFileURIPrefix) - 1) != 0) &&
         (PL_strncmp(aURI, kResourceURIPrefix, sizeof(kResourceURIPrefix) - 1) != 0))
     {
@@ -858,17 +858,17 @@ RDFXMLDataSourceImpl::SetReadOnly(bool a
 // This code is copied from nsSameOriginChecker::OnChannelRedirect. See
 // bug 475940 on providing this code in a shared location.
 NS_IMETHODIMP
 RDFXMLDataSourceImpl::AsyncOnChannelRedirect(nsIChannel *aOldChannel,
                                              nsIChannel *aNewChannel,
                                              uint32_t aFlags,
                                              nsIAsyncVerifyRedirectCallback *cb)
 {
-    NS_PRECONDITION(aNewChannel, "Redirecting to null channel?");
+    NS_ASSERTION(aNewChannel, "Redirecting to null channel?");
 
     nsresult rv;
     nsCOMPtr<nsIScriptSecurityManager> secMan =
         do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIPrincipal> oldPrincipal;
     secMan->GetChannelResultPrincipal(aOldChannel, getter_AddRefs(oldPrincipal));
--- a/rdf/datasource/nsLocalStore.cpp
+++ b/rdf/datasource/nsLocalStore.cpp
@@ -204,21 +204,21 @@ LocalStoreImpl::~LocalStoreImpl(void)
     if (mRDFService)
         mRDFService->UnregisterDataSource(this);
 }
 
 
 nsresult
 NS_NewLocalStore(nsISupports* aOuter, REFNSIID aIID, void** aResult)
 {
-    NS_PRECONDITION(aOuter == nullptr, "no aggregation");
+    NS_ASSERTION(aOuter == nullptr, "no aggregation");
     if (aOuter)
         return NS_ERROR_NO_AGGREGATION;
 
-    NS_PRECONDITION(aResult != nullptr, "null ptr");
+    NS_ASSERTION(aResult != nullptr, "null ptr");
     if (! aResult)
         return NS_ERROR_NULL_POINTER;
 
     LocalStoreImpl* impl = new LocalStoreImpl();
     if (! impl)
         return NS_ERROR_OUT_OF_MEMORY;
 
     NS_ADDREF(impl);