Bug 1459748 - Follow-up: Replace NS_PRECONDITION with NS_ASSERTION after removal in bug 1457813. rs=bustage-fix DONTBUILD

This commit is contained in:
Jorg K 2018-05-08 19:15:24 +02:00
Родитель 0c8b0b55e4
Коммит 07d01f3c3a
11 изменённых файлов: 125 добавлений и 125 удалений

Просмотреть файл

@ -162,7 +162,7 @@ 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;
@ -573,15 +573,15 @@ CompositeDataSourceImpl::GetSources(nsIRDFResource* aProperty,
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;
@ -606,15 +606,15 @@ CompositeDataSourceImpl::GetTarget(nsIRDFResource* aSource,
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;
@ -678,15 +678,15 @@ CompositeDataSourceImpl::GetTargets(nsIRDFResource* aSource,
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;
@ -713,15 +713,15 @@ CompositeDataSourceImpl::Assert(nsIRDFResource* aSource,
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;
@ -753,15 +753,15 @@ 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;
@ -819,19 +819,19 @@ CompositeDataSourceImpl::Change(nsIRDFResource* aSource,
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;
@ -863,19 +863,19 @@ CompositeDataSourceImpl::Move(nsIRDFResource* aOldSource,
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;
@ -909,15 +909,15 @@ CompositeDataSourceImpl::HasAssertion(nsIRDFResource* aSource,
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;
@ -962,7 +962,7 @@ CompositeDataSourceImpl::HasAssertion(nsIRDFResource* aSource,
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;
@ -975,7 +975,7 @@ CompositeDataSourceImpl::AddObserver(nsIRDFObserver* aObserver)
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;
@ -1017,11 +1017,11 @@ CompositeDataSourceImpl::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc
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;
@ -1043,11 +1043,11 @@ 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;

Просмотреть файл

@ -113,7 +113,7 @@ 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;
@ -235,15 +235,15 @@ 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;

Просмотреть файл

@ -16,7 +16,7 @@
nsresult
NS_NewDefaultResource(nsIRDFResource** aResult)
{
NS_PRECONDITION(aResult != nullptr, "null ptr");
NS_ASSERTION(aResult != nullptr, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;

Просмотреть файл

@ -598,7 +598,7 @@ 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;
@ -691,7 +691,7 @@ InMemoryArcsEnumeratorImpl::GetNext(nsISupports** aResult)
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;
@ -838,15 +838,15 @@ InMemoryDataSource::GetSource(nsIRDFResource* property,
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;
@ -867,15 +867,15 @@ InMemoryDataSource::GetTarget(nsIRDFResource* source,
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;
@ -963,15 +963,15 @@ InMemoryDataSource::GetSources(nsIRDFResource* aProperty,
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;
@ -994,15 +994,15 @@ InMemoryDataSource::GetTargets(nsIRDFResource* aSource,
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;
@ -1118,15 +1118,15 @@ InMemoryDataSource::Assert(nsIRDFResource* aSource,
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;
@ -1273,15 +1273,15 @@ 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;
@ -1318,19 +1318,19 @@ InMemoryDataSource::Change(nsIRDFResource* aSource,
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;
@ -1373,19 +1373,19 @@ InMemoryDataSource::Move(nsIRDFResource* aOldSource,
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;
@ -1425,7 +1425,7 @@ InMemoryDataSource::Move(nsIRDFResource* aOldSource,
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;
@ -1438,7 +1438,7 @@ InMemoryDataSource::AddObserver(nsIRDFObserver* aObserver)
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;
@ -1494,7 +1494,7 @@ InMemoryDataSource::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, boo
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;
@ -1513,7 +1513,7 @@ InMemoryDataSource::ArcLabelsIn(nsIRDFNode* aTarget, nsISimpleEnumerator** aResu
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;
@ -1668,15 +1668,15 @@ InMemoryDataSource::Mark(nsIRDFResource* aSource,
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;

Просмотреть файл

@ -115,11 +115,11 @@ RDFContainerImpl::GetResource(nsIRDFResource** _retval)
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;
@ -205,7 +205,7 @@ 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;
@ -228,7 +228,7 @@ 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;
@ -268,11 +268,11 @@ RDFContainerImpl::InsertElementAt(nsIRDFNode *aElement, int32_t aIndex, bool aRe
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;

Просмотреть файл

@ -76,7 +76,7 @@ NS_IMPL_ISUPPORTS(RDFContainerUtilsImpl, nsIRDFContainerUtils)
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;
@ -116,7 +116,7 @@ RDFContainerUtilsImpl::IsOrdinalProperty(nsIRDFResource *aProperty, bool *_retva
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;
@ -135,7 +135,7 @@ RDFContainerUtilsImpl::IndexToOrdinalResource(int32_t aIndex, nsIRDFResource **a
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;
@ -177,15 +177,15 @@ RDFContainerUtilsImpl::OrdinalResourceToIndex(nsIRDFResource *aOrdinal, int32_t
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;
@ -234,15 +234,15 @@ RDFContainerUtilsImpl::IsEmpty(nsIRDFDataSource* aDataSource, nsIRDFResource* aR
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;
@ -254,15 +254,15 @@ RDFContainerUtilsImpl::IsBag(nsIRDFDataSource *aDataSource, nsIRDFResource *aRes
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;
@ -274,15 +274,15 @@ RDFContainerUtilsImpl::IsSeq(nsIRDFDataSource *aDataSource, nsIRDFResource *aRes
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;
@ -365,7 +365,7 @@ RDFContainerUtilsImpl::~RDFContainerUtilsImpl()
nsresult
NS_NewRDFContainerUtils(nsIRDFContainerUtils** aResult)
{
NS_PRECONDITION(aResult != nullptr, "null ptr");
NS_ASSERTION(aResult != nullptr, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;
@ -384,13 +384,13 @@ NS_NewRDFContainerUtils(nsIRDFContainerUtils** aResult)
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;

Просмотреть файл

@ -325,7 +325,7 @@ 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;
@ -496,7 +496,7 @@ RDFContentSinkImpl::ReportError(const char16_t* aErrorText,
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;
@ -569,7 +569,7 @@ RDFContentSinkImpl::SetParser(nsParserBase* aParser)
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;
@ -581,7 +581,7 @@ RDFContentSinkImpl::Init(nsIURI* aURL)
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;
@ -1430,7 +1430,7 @@ RDFContentSinkImpl::PopContext(nsIRDFResource *&aResource,
nsresult
NS_NewRDFContentSink(nsIRDFContentSink** aResult)
{
NS_PRECONDITION(aResult != nullptr, "null ptr");
NS_ASSERTION(aResult != nullptr, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;

Просмотреть файл

@ -50,7 +50,7 @@ NS_IMPL_ISUPPORTS(nsRDFResource, nsIRDFResource, nsIRDFNode)
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;
@ -76,7 +76,7 @@ nsRDFResource::EqualsNode(nsIRDFNode* aNode, bool* aResult)
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;
@ -121,11 +121,11 @@ nsRDFResource::GetValueConst(const char** aURI)
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;
@ -134,7 +134,7 @@ nsRDFResource::EqualsString(const char* aURI, bool* aResult)
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;
@ -193,7 +193,7 @@ nsRDFResource::GetDelegate(const char* aKey, REFNSIID aIID, void** aResult)
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;

Просмотреть файл

@ -804,8 +804,8 @@ 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())
@ -975,11 +975,11 @@ static int32_t kShift = 6;
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;
@ -1057,7 +1057,7 @@ RDFServiceImpl::GetBlobLiteral(const uint8_t *aBytes, int32_t aLength,
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;
@ -1085,7 +1085,7 @@ RDFServiceImpl::IsAnonymousResource(nsIRDFResource* aResource, bool* _result)
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;
@ -1140,7 +1140,7 @@ RDFServiceImpl::RegisterResource(nsIRDFResource* aResource, bool aReplace)
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;
@ -1170,7 +1170,7 @@ RDFServiceImpl::UnregisterResource(nsIRDFResource* aResource)
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;
@ -1219,7 +1219,7 @@ RDFServiceImpl::RegisterDataSource(nsIRDFDataSource* aDataSource, bool aReplace)
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;
@ -1273,7 +1273,7 @@ RDFServiceImpl::GetDataSourceBlocking(const char* aURI, nsIRDFDataSource** aData
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;

Просмотреть файл

@ -368,7 +368,7 @@ 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;
@ -572,7 +572,7 @@ RDFXMLDataSourceImpl::GetLoaded(bool* _result)
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;
@ -785,7 +785,7 @@ RDFXMLDataSourceImpl::rdfXMLFlush(nsIURI *aURI)
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;
@ -863,7 +863,7 @@ RDFXMLDataSourceImpl::AsyncOnChannelRedirect(nsIChannel *aOldChannel,
uint32_t aFlags,
nsIAsyncVerifyRedirectCallback *cb)
{
NS_PRECONDITION(aNewChannel, "Redirecting to null channel?");
NS_ASSERTION(aNewChannel, "Redirecting to null channel?");
nsresult rv;
nsCOMPtr<nsIScriptSecurityManager> secMan =

Просмотреть файл

@ -209,11 +209,11 @@ LocalStoreImpl::~LocalStoreImpl(void)
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;