From e2c76feee93328e658016d4fd04c3a4230fe6f1d Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Thu, 1 Jul 1999 01:21:14 +0000 Subject: [PATCH] Bug 9098. Remove NS_PRECONDITION, as this can happen normally as part of teardown. git-svn-id: svn://10.0.0.236/trunk@37620 18797224-902f-48f8-a5cc-f745e15eee43 --- .../content/xul/templates/src/nsXULTemplateBuilder.cpp | 10 ++++++---- mozilla/rdf/content/src/nsRDFGenericBuilder.cpp | 10 ++++++---- mozilla/rdf/content/src/nsXULTemplateBuilder.cpp | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp index 909f36f7615..5f94c5deb76 100644 --- a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp +++ b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp @@ -1271,9 +1271,10 @@ RDFGenericBuilderImpl::OnAssert(nsIRDFResource* aSubject, nsIRDFResource* aPredicate, nsIRDFNode* aObject) { - NS_PRECONDITION(mDocument != nsnull, "not initialized"); + // Just silently fail, because this can happen "normally" as part + // of tear-down code. (Bug 9098) if (! mDocument) - return NS_ERROR_NOT_INITIALIZED; + return NS_OK; nsresult rv; @@ -1498,9 +1499,10 @@ RDFGenericBuilderImpl::OnUnassert(nsIRDFResource* aSubject, nsIRDFResource* aPredicate, nsIRDFNode* aObject) { - NS_PRECONDITION(mDocument != nsnull, "not initialized"); + // Just silently fail, because this can happen "normally" as part + // of tear-down code. (Bug 9098) if (! mDocument) - return NS_ERROR_NOT_INITIALIZED; + return NS_OK; nsresult rv; diff --git a/mozilla/rdf/content/src/nsRDFGenericBuilder.cpp b/mozilla/rdf/content/src/nsRDFGenericBuilder.cpp index 909f36f7615..5f94c5deb76 100644 --- a/mozilla/rdf/content/src/nsRDFGenericBuilder.cpp +++ b/mozilla/rdf/content/src/nsRDFGenericBuilder.cpp @@ -1271,9 +1271,10 @@ RDFGenericBuilderImpl::OnAssert(nsIRDFResource* aSubject, nsIRDFResource* aPredicate, nsIRDFNode* aObject) { - NS_PRECONDITION(mDocument != nsnull, "not initialized"); + // Just silently fail, because this can happen "normally" as part + // of tear-down code. (Bug 9098) if (! mDocument) - return NS_ERROR_NOT_INITIALIZED; + return NS_OK; nsresult rv; @@ -1498,9 +1499,10 @@ RDFGenericBuilderImpl::OnUnassert(nsIRDFResource* aSubject, nsIRDFResource* aPredicate, nsIRDFNode* aObject) { - NS_PRECONDITION(mDocument != nsnull, "not initialized"); + // Just silently fail, because this can happen "normally" as part + // of tear-down code. (Bug 9098) if (! mDocument) - return NS_ERROR_NOT_INITIALIZED; + return NS_OK; nsresult rv; diff --git a/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp b/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp index 909f36f7615..5f94c5deb76 100644 --- a/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp +++ b/mozilla/rdf/content/src/nsXULTemplateBuilder.cpp @@ -1271,9 +1271,10 @@ RDFGenericBuilderImpl::OnAssert(nsIRDFResource* aSubject, nsIRDFResource* aPredicate, nsIRDFNode* aObject) { - NS_PRECONDITION(mDocument != nsnull, "not initialized"); + // Just silently fail, because this can happen "normally" as part + // of tear-down code. (Bug 9098) if (! mDocument) - return NS_ERROR_NOT_INITIALIZED; + return NS_OK; nsresult rv; @@ -1498,9 +1499,10 @@ RDFGenericBuilderImpl::OnUnassert(nsIRDFResource* aSubject, nsIRDFResource* aPredicate, nsIRDFNode* aObject) { - NS_PRECONDITION(mDocument != nsnull, "not initialized"); + // Just silently fail, because this can happen "normally" as part + // of tear-down code. (Bug 9098) if (! mDocument) - return NS_ERROR_NOT_INITIALIZED; + return NS_OK; nsresult rv;