From b71a1a1cfa6541641cd3cf768a44460cb476cb9b Mon Sep 17 00:00:00 2001 From: Hashem Masoud Date: Fri, 14 Aug 2009 16:09:00 +0200 Subject: [PATCH] Bug 489502 - Replace NS_ASSERTION(0, ...) by NS_ERROR(...) in mozilla-central; r=benjamin --- .../canvas/src/nsCanvasRenderingContext2D.cpp | 6 ++-- content/xslt/src/xml/txAttr.cpp | 2 +- content/xslt/src/xml/txDOM.h | 2 +- content/xslt/src/xml/txNodeDefinition.cpp | 2 +- content/xslt/src/xpath/txFunctionCall.cpp | 2 +- .../xslt/src/xslt/txCurrentFunctionCall.cpp | 2 +- content/xslt/src/xslt/txXSLTPatterns.cpp | 2 +- db/mork/src/morkConfig.cpp | 2 +- editor/libeditor/html/nsHTMLDataTransfer.cpp | 2 +- editor/txtsvc/src/nsTextServicesDocument.cpp | 6 ++-- .../activex/src/common/ControlSite.cpp | 2 +- .../src/common/IEHtmlElementCollection.cpp | 34 +++++++++---------- .../browser/activex/src/common/IEHtmlNode.cpp | 2 +- .../activex/src/common/IWebBrowserImpl.h | 16 ++++----- .../commandhandler/src/nsCommandParams.h | 4 +-- gfx/src/thebes/nsThebesDeviceContext.cpp | 4 +-- gfx/thebes/src/gfxFT2Fonts.cpp | 2 +- intl/locale/src/os2/nsCollationOS2.cpp | 2 +- intl/locale/src/unix/nsCollationUnix.cpp | 2 +- .../strres/src/nsStringBundleTextOverride.cpp | 2 +- intl/uconv/src/nsUNIXCharset.cpp | 12 +++---- intl/uconv/util/nsUCSupport.cpp | 4 +-- js/jsd/jsd_xpc.cpp | 2 +- js/src/xpconnect/src/XPCDispObject.cpp | 2 +- js/src/xpconnect/src/xpcconvert.cpp | 34 +++++++++---------- js/src/xpconnect/src/xpcjsid.cpp | 4 +-- js/src/xpconnect/src/xpcthreadcontext.cpp | 6 ++-- js/src/xpconnect/src/xpcwrappednative.cpp | 6 ++-- js/src/xpconnect/src/xpcwrappednativeinfo.cpp | 4 +-- js/src/xpconnect/tests/TestXPC.cpp | 8 ++--- layout/base/nsCSSFrameConstructor.cpp | 2 +- layout/forms/nsTextControlFrame.cpp | 2 +- layout/generic/nsFrame.cpp | 2 +- layout/generic/nsSelection.cpp | 2 +- layout/mathml/nsMathMLmpaddedFrame.cpp | 2 +- modules/plugin/base/src/nsNPAPIPlugin.cpp | 2 +- security/manager/ssl/src/nsCipherInfo.cpp | 2 +- security/manager/ssl/src/nsCrypto.cpp | 4 +-- security/manager/ssl/src/nsNSSASN1Object.cpp | 2 +- security/manager/ssl/src/nsNSSCertHelper.cpp | 4 +-- security/manager/ssl/src/nsNSSCertificate.cpp | 10 +++--- .../manager/ssl/src/nsNSSCertificateDB.cpp | 4 +-- .../downloads/src/nsDownloadManager.cpp | 2 +- widget/src/beos/nsWindow.cpp | 2 +- widget/src/cocoa/nsChildView.mm | 2 +- widget/src/cocoa/nsCocoaWindow.mm | 2 +- widget/src/cocoa/nsFilePicker.mm | 2 +- widget/src/cocoa/nsToolkit.mm | 2 +- widget/src/os2/nsDragService.cpp | 4 +-- widget/src/os2/nsWindow.cpp | 2 +- widget/src/photon/nsWidget.cpp | 4 +-- widget/src/windows/nsFilePicker.cpp | 2 +- widget/src/windows/nsWindow.cpp | 4 +-- widget/src/windows/nsWindowCE.cpp | 2 +- xpcom/base/nsMemoryImpl.cpp | 4 +-- xpcom/components/nsComponentManager.cpp | 2 +- xpcom/obsolete/nsFileSpec.cpp | 10 +++--- xpcom/obsolete/nsFileSpecImpl.cpp | 4 +-- xpcom/obsolete/nsFileSpecOS2.cpp | 2 +- xpcom/obsolete/nsFileSpecWin.cpp | 2 +- .../src/md/os2/xptcstubs_gcc_x86_os2.cpp | 2 +- .../src/md/unix/xptcstubs_alpha_openbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_amd64_openbsd.cpp | 4 +-- .../xptcall/src/md/unix/xptcstubs_arm.cpp | 4 +-- .../src/md/unix/xptcstubs_arm_netbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_arm_openbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_gcc_x86_unix.cpp | 2 +- .../xptcall/src/md/unix/xptcstubs_ipf32.cpp | 4 +-- .../xptcall/src/md/unix/xptcstubs_ipf64.cpp | 4 +-- .../xptcall/src/md/unix/xptcstubs_irix.cpp | 4 +-- .../src/md/unix/xptcstubs_linux_alpha.cpp | 4 +-- .../src/md/unix/xptcstubs_linux_m68k.cpp | 4 +-- .../src/md/unix/xptcstubs_linux_s390.cpp | 4 +-- .../src/md/unix/xptcstubs_linux_s390x.cpp | 4 +-- .../xptcall/src/md/unix/xptcstubs_mips.cpp | 2 +- .../src/md/unix/xptcstubs_netbsd_m68k.cpp | 4 +-- .../xptcall/src/md/unix/xptcstubs_nto_arm.cpp | 4 +-- .../src/md/unix/xptcstubs_nto_shle.cpp | 2 +- .../src/md/unix/xptcstubs_openvms_alpha.cpp | 4 +-- .../src/md/unix/xptcstubs_osf1_alpha.cpp | 4 +-- .../xptcall/src/md/unix/xptcstubs_pa32.cpp | 4 +-- .../src/md/unix/xptcstubs_ppc64_linux.cpp | 4 +-- .../xptcall/src/md/unix/xptcstubs_ppc_aix.cpp | 4 +-- .../src/md/unix/xptcstubs_ppc_aix64.cpp | 4 +-- .../src/md/unix/xptcstubs_ppc_linux.cpp | 4 +-- .../src/md/unix/xptcstubs_ppc_netbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_ppc_openbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_ppc_rhapsody.cpp | 4 +-- .../src/md/unix/xptcstubs_sparc64_openbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_sparc_netbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_sparc_openbsd.cpp | 4 +-- .../src/md/unix/xptcstubs_sparc_solaris.cpp | 4 +-- .../src/md/unix/xptcstubs_sparcv9_solaris.cpp | 4 +-- .../src/md/unix/xptcstubs_unixish_x86.cpp | 2 +- .../src/md/unix/xptcstubs_x86_64_darwin.cpp | 4 +-- .../src/md/unix/xptcstubs_x86_64_linux.cpp | 4 +-- .../src/md/unix/xptcstubs_x86_solaris.cpp | 2 +- .../xptcall/src/md/win32/xptcstubs.cpp | 4 +-- .../xptcall/src/md/win32/xptcstubs_alpha.cpp | 4 +-- .../xptcall/src/md/win32/xptcstubs_x86_64.cpp | 4 +-- .../xptcall/src/md/win32/xptcstubsce.cpp | 4 +-- 101 files changed, 212 insertions(+), 212 deletions(-) diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index e05d22922380..96e08fabc126 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -2033,7 +2033,7 @@ nsCanvasRenderingContext2D::GetTextAlign(nsAString& ta) ta.AssignLiteral("center"); break; default: - NS_ASSERTION(0, "textAlign holds invalid value"); + NS_ERROR("textAlign holds invalid value"); return NS_ERROR_FAILURE; } @@ -2086,7 +2086,7 @@ nsCanvasRenderingContext2D::GetTextBaseline(nsAString& tb) tb.AssignLiteral("bottom"); break; default: - NS_ASSERTION(0, "textBaseline holds invalid value"); + NS_ERROR("textBaseline holds invalid value"); return NS_ERROR_FAILURE; } @@ -2365,7 +2365,7 @@ nsCanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText, anchorY = -fontMetrics.emDescent; break; default: - NS_ASSERTION(0, "mTextBaseline holds invalid value"); + NS_ERROR("mTextBaseline holds invalid value"); return NS_ERROR_FAILURE; } diff --git a/content/xslt/src/xml/txAttr.cpp b/content/xslt/src/xml/txAttr.cpp index 5bf15b4a3abc..0e70c0e85c34 100644 --- a/content/xslt/src/xml/txAttr.cpp +++ b/content/xslt/src/xml/txAttr.cpp @@ -60,7 +60,7 @@ Attr::Attr(nsIAtom *aPrefix, nsIAtom *aLocalName, PRInt32 aNamespaceID, // Node* Attr::appendChild(Node* newChild) { - NS_ASSERTION(0, "not implemented"); + NS_ERROR("not implemented"); return nsnull; } diff --git a/content/xslt/src/xml/txDOM.h b/content/xslt/src/xml/txDOM.h index a6275726898e..7fd342c9997c 100644 --- a/content/xslt/src/xml/txDOM.h +++ b/content/xslt/src/xml/txDOM.h @@ -395,7 +395,7 @@ public: } if (!mNamespaces->AppendString(aURI)) { - NS_ASSERTION(0, "Out of memory, namespaces are getting lost"); + NS_ERROR("Out of memory, namespaces are getting lost"); return kNameSpaceID_Unknown; } diff --git a/content/xslt/src/xml/txNodeDefinition.cpp b/content/xslt/src/xml/txNodeDefinition.cpp index 6e448d9734ff..e7b060737a58 100644 --- a/content/xslt/src/xml/txNodeDefinition.cpp +++ b/content/xslt/src/xml/txNodeDefinition.cpp @@ -364,7 +364,7 @@ NodeDefinition::OrderInfo* NodeDefinition::getOrderInfo() } } - NS_ASSERTION(0, "unable to get childnumber"); + NS_ERROR("unable to get childnumber"); mOrderInfo->mOrder[lastElem] = 0; return mOrderInfo; } diff --git a/content/xslt/src/xpath/txFunctionCall.cpp b/content/xslt/src/xpath/txFunctionCall.cpp index f118a85cadd7..2e6df285f090 100644 --- a/content/xslt/src/xpath/txFunctionCall.cpp +++ b/content/xslt/src/xpath/txFunctionCall.cpp @@ -145,7 +145,7 @@ FunctionCall::toString(nsAString& aDest) nsAutoString functionName; if (NS_FAILED(getNameAtom(getter_AddRefs(functionNameAtom))) || NS_FAILED(functionNameAtom->ToString(functionName))) { - NS_ASSERTION(0, "Can't get function name."); + NS_ERROR("Can't get function name."); return; } diff --git a/content/xslt/src/xslt/txCurrentFunctionCall.cpp b/content/xslt/src/xslt/txCurrentFunctionCall.cpp index 91c663a4d390..7fdf07eb6874 100644 --- a/content/xslt/src/xslt/txCurrentFunctionCall.cpp +++ b/content/xslt/src/xslt/txCurrentFunctionCall.cpp @@ -30,7 +30,7 @@ CurrentFunctionCall::evaluate(txIEvalContext* aContext, txAExprResult** aResult) txExecutionState* es = static_cast(aContext->getPrivateContext()); if (!es) { - NS_ASSERTION(0, + NS_ERROR( "called xslt extension function \"current\" with wrong context"); return NS_ERROR_UNEXPECTED; } diff --git a/content/xslt/src/xslt/txXSLTPatterns.cpp b/content/xslt/src/xslt/txXSLTPatterns.cpp index aa0905cacfcd..60650a07cb9f 100644 --- a/content/xslt/src/xslt/txXSLTPatterns.cpp +++ b/content/xslt/src/xslt/txXSLTPatterns.cpp @@ -55,7 +55,7 @@ */ double txUnionPattern::getDefaultPriority() { - NS_ASSERTION(0, "Don't call getDefaultPriority on txUnionPattern"); + NS_ERROR("Don't call getDefaultPriority on txUnionPattern"); return Double::NaN; } diff --git a/db/mork/src/morkConfig.cpp b/db/mork/src/morkConfig.cpp index 1f6cd0a6b42c..b4f00ebdfd5c 100644 --- a/db/mork/src/morkConfig.cpp +++ b/db/mork/src/morkConfig.cpp @@ -53,7 +53,7 @@ void mork_assertion_signal(const char* inMessage) { #if defined(MORK_WIN) || defined(MORK_MAC) // asm { int 3 } - NS_ASSERTION(0, inMessage); + NS_ERROR(inMessage); #endif /*MORK_WIN*/ } diff --git a/editor/libeditor/html/nsHTMLDataTransfer.cpp b/editor/libeditor/html/nsHTMLDataTransfer.cpp index 04d7a4b7ae5a..7a9a42a81fa9 100644 --- a/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -1224,7 +1224,7 @@ nsHTMLEditor::ParseCFHTML(nsCString & aCfhtml, PRUnichar **aStuffToPaste, PRUnic { // working backwards, the first thing we see is the start of a tag // so StartFragment is bad, so we need to update it. - NS_ASSERTION(0, "StartFragment byte count in the clipboard looks bad, see bug #228879"); + NS_ERROR("StartFragment byte count in the clipboard looks bad, see bug #228879"); startFragment = curPos - 1; } break; diff --git a/editor/txtsvc/src/nsTextServicesDocument.cpp b/editor/txtsvc/src/nsTextServicesDocument.cpp index 0029d5b3ed70..dfdbbbcbcab2 100644 --- a/editor/txtsvc/src/nsTextServicesDocument.cpp +++ b/editor/txtsvc/src/nsTextServicesDocument.cpp @@ -1869,7 +1869,7 @@ nsTextServicesDocument::DeleteNode(nsIDOMNode *aChild) // next valid text node in the offset table, and if there // wasn't a next, it would've set mIteratorStatus to eIsDone. - NS_ASSERTION(0, "DeleteNode called for current iterator node."); + NS_ERROR("DeleteNode called for current iterator node."); } tcount = mOffsetTable.Length(); @@ -1932,7 +1932,7 @@ nsTextServicesDocument::JoinNodes(nsIDOMNode *aLeftNode, if (nsIDOMNode::TEXT_NODE != type) { - NS_ASSERTION(0, "JoinNode called with a non-text left node!"); + NS_ERROR("JoinNode called with a non-text left node!"); return NS_ERROR_FAILURE; } @@ -1943,7 +1943,7 @@ nsTextServicesDocument::JoinNodes(nsIDOMNode *aLeftNode, if (nsIDOMNode::TEXT_NODE != type) { - NS_ASSERTION(0, "JoinNode called with a non-text right node!"); + NS_ERROR("JoinNode called with a non-text right node!"); return NS_ERROR_FAILURE; } diff --git a/embedding/browser/activex/src/common/ControlSite.cpp b/embedding/browser/activex/src/common/ControlSite.cpp index 4476e3b5fe0b..8eb5c83636c9 100644 --- a/embedding/browser/activex/src/common/ControlSite.cpp +++ b/embedding/browser/activex/src/common/ControlSite.cpp @@ -395,7 +395,7 @@ HRESULT CControlSite::Attach(HWND hwndParent, const RECT &rcPos, IUnknown *pInit if (hwndParent == NULL) { - NS_ASSERTION(0, "No parent hwnd"); + NS_ERROR("No parent hwnd"); return E_INVALIDARG; } diff --git a/embedding/browser/activex/src/common/IEHtmlElementCollection.cpp b/embedding/browser/activex/src/common/IEHtmlElementCollection.cpp index af30444eb6c0..8b1c78aac42c 100644 --- a/embedding/browser/activex/src/common/IEHtmlElementCollection.cpp +++ b/embedding/browser/activex/src/common/IEHtmlElementCollection.cpp @@ -105,7 +105,7 @@ HRESULT CIEHtmlElementCollection::PopulateFromDOMHTMLCollection(nsIDOMHTMLCollec if (!childNode) { // Empty node (unexpected, but try and carry on anyway) - NS_ASSERTION(0, "Empty node"); + NS_ERROR("Empty node"); continue; } @@ -131,7 +131,7 @@ HRESULT CIEHtmlElementCollection::PopulateFromDOMNode(nsIDOMNode *aDOMNode, BOOL { if (aDOMNode == nsnull) { - NS_ASSERTION(0, "No dom node"); + NS_ERROR("No dom node"); return E_INVALIDARG; } @@ -196,14 +196,14 @@ HRESULT CIEHtmlElementCollection::CreateFromDOMHTMLCollection(CNode *pParentNode { if (pInstance == NULL || pParentNode == NULL) { - NS_ASSERTION(0, "No instance or parent node"); + NS_ERROR("No instance or parent node"); return E_INVALIDARG; } // Get the DOM node from the parent node if (!pParentNode->mDOMNode) { - NS_ASSERTION(0, "Parent has no DOM node"); + NS_ERROR("Parent has no DOM node"); return E_INVALIDARG; } @@ -214,7 +214,7 @@ HRESULT CIEHtmlElementCollection::CreateFromDOMHTMLCollection(CNode *pParentNode CIEHtmlElementCollectionInstance::CreateInstance(&pCollection); if (pCollection == NULL) { - NS_ASSERTION(0, "Could not create collection"); + NS_ERROR("Could not create collection"); return E_OUTOFMEMORY; } @@ -231,14 +231,14 @@ HRESULT CIEHtmlElementCollection::CreateFromParentNode(CNode *pParentNode, BOOL { if (pInstance == NULL || pParentNode == NULL) { - NS_ASSERTION(0, "No instance or parent node"); + NS_ERROR("No instance or parent node"); return E_INVALIDARG; } // Get the DOM node from the parent node if (!pParentNode->mDOMNode) { - NS_ASSERTION(0, "Parent has no DOM node"); + NS_ERROR("Parent has no DOM node"); return E_INVALIDARG; } @@ -249,7 +249,7 @@ HRESULT CIEHtmlElementCollection::CreateFromParentNode(CNode *pParentNode, BOOL CIEHtmlElementCollectionInstance::CreateInstance(&pCollection); if (pCollection == NULL) { - NS_ASSERTION(0, "Could not create collection"); + NS_ERROR("Could not create collection"); return E_OUTOFMEMORY; } @@ -267,7 +267,7 @@ HRESULT CIEHtmlElementCollection::AddNode(IDispatch *pNode) { if (pNode == NULL) { - NS_ASSERTION(0, "No node"); + NS_ERROR("No node"); return E_INVALIDARG; } @@ -287,7 +287,7 @@ HRESULT CIEHtmlElementCollection::AddNode(IDispatch *pNode) if (mNodeList == NULL) { - NS_ASSERTION(0, "Could not realloc node list"); + NS_ERROR("Could not realloc node list"); return E_OUTOFMEMORY; } @@ -342,7 +342,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElementCollection::get_length(long __RPC_FAR *p if (!childNode) { // Empty node (unexpected, but try and carry on anyway) - NS_ASSERTION(0, "Empty node"); + NS_ERROR("Empty node"); continue; } @@ -381,7 +381,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElementCollection::get__newEnum(IUnknown __RPC_ CComEnumVARIANT::CreateInstance(&pEnumVARIANT); if (pEnumVARIANT == NULL) { - NS_ASSERTION(0, "Could not creat Enum"); + NS_ERROR("Could not creat Enum"); return E_OUTOFMEMORY; } @@ -393,7 +393,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElementCollection::get__newEnum(IUnknown __RPC_ VARIANT *avObjects = new VARIANT[nObjects]; if (avObjects == NULL) { - NS_ASSERTION(0, "Could not create variant array"); + NS_ERROR("Could not create variant array"); return E_OUTOFMEMORY; } @@ -410,7 +410,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElementCollection::get__newEnum(IUnknown __RPC_ if (!childNode) { // Empty node (unexpected, but try and carry on anyway) - NS_ASSERTION(0, "Could not get node"); + NS_ERROR("Could not get node"); continue; } @@ -528,7 +528,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElementCollection::item(VARIANT name, VARIANT i if (!childNode) { // Empty node (unexpected, but try and carry on anyway) - NS_ASSERTION(0, "Could not get node"); + NS_ERROR("Could not get node"); continue; } @@ -638,7 +638,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElementCollection::item(VARIANT name, VARIANT i IDispatch *pNode = mNodeList[idxForSearch]; if (pNode == NULL) { - NS_ASSERTION(0, "No node"); + NS_ERROR("No node"); return E_UNEXPECTED; } pNode->QueryInterface(IID_IDispatch, (void **) pdisp); @@ -688,7 +688,7 @@ HRESULT STDMETHODCALLTYPE CIEHtmlElementCollection::tags(VARIANT tagName, IDispa if (!childNode) { // Empty node (unexpected, but try and carry on anyway) - NS_ASSERTION(0, "Could not get node"); + NS_ERROR("Could not get node"); continue; } diff --git a/embedding/browser/activex/src/common/IEHtmlNode.cpp b/embedding/browser/activex/src/common/IEHtmlNode.cpp index 5922c9fd4d32..087580e01efc 100644 --- a/embedding/browser/activex/src/common/IEHtmlNode.cpp +++ b/embedding/browser/activex/src/common/IEHtmlNode.cpp @@ -148,7 +148,7 @@ CIEHtmlDomNode::~CIEHtmlDomNode() WrapperType::CreateInstance(&pWrapper); \ if (!pWrapper) \ { \ - NS_ASSERTION(0, errorMsg); \ + NS_ERROR(errorMsg); \ return E_OUTOFMEMORY; \ } \ if (FAILED(pWrapper->QueryInterface(IID_IUnknown, (void**)pNode))) \ diff --git a/embedding/browser/activex/src/common/IWebBrowserImpl.h b/embedding/browser/activex/src/common/IWebBrowserImpl.h index b3f40bee8f38..aee8520dba9d 100644 --- a/embedding/browser/activex/src/common/IWebBrowserImpl.h +++ b/embedding/browser/activex/src/common/IWebBrowserImpl.h @@ -64,7 +64,7 @@ typedef long SHANDLE_PTR; #define ENSURE_BROWSER_IS_VALID() \ if (!BrowserIsValid()) \ { \ - NS_ASSERTION(0, "Browser is not valid"); \ + NS_ERROR("Browser is not valid"); \ return SetErrorInfo(E_UNEXPECTED, L"Browser is not in a valid state"); \ } @@ -73,7 +73,7 @@ typedef long SHANDLE_PTR; nsresult rv = GetWebNavigation(getter_AddRefs(webNav)); \ if (NS_FAILED(rv)) \ { \ - NS_ASSERTION(0, "Cannot get nsIWebNavigation"); \ + NS_ERROR("Cannot get nsIWebNavigation"); \ return SetErrorInfo(E_UNEXPECTED, L"Could not obtain nsIWebNavigation interface"); \ } @@ -236,7 +236,7 @@ public: // Extract the URL parameter if (URL == NULL) { - NS_ASSERTION(0, "No URL supplied"); + NS_ERROR("No URL supplied"); return SetErrorInfo(E_INVALIDARG); } @@ -253,7 +253,7 @@ public: CComVariant vFlags; if ( vFlags.ChangeType(VT_I4, Flags) != S_OK ) { - NS_ASSERTION(0, "Flags param is invalid"); + NS_ERROR("Flags param is invalid"); return SetErrorInfo(E_INVALIDARG); } lFlags = vFlags.lVal; @@ -380,7 +380,7 @@ public: rv = stream->AdoptData(tmp, nSize); if (NS_FAILED(rv) || !stream) { - NS_ASSERTION(0, "cannot create byte stream"); + NS_ERROR("cannot create byte stream"); nsMemory::Free(tmp); return SetErrorInfo(E_UNEXPECTED); } @@ -416,7 +416,7 @@ public: if (NS_FAILED(rv) || !headersStream) { - NS_ASSERTION(0, "cannot create byte stream"); + NS_ERROR("cannot create byte stream"); nsMemory::Free(tmp); } } @@ -467,7 +467,7 @@ public: CComVariant vLevelAsInt; if ( vLevelAsInt.ChangeType(VT_I4, Level) != S_OK ) { - NS_ASSERTION(0, "Cannot change refresh type to int"); + NS_ERROR("Cannot change refresh type to int"); return SetErrorInfo(E_UNEXPECTED); } iRefreshLevel = (OLECMDID_REFRESHFLAG) vLevelAsInt.iVal; @@ -488,7 +488,7 @@ public: break; default: // No idea what refresh type this is supposed to be - NS_ASSERTION(0, "Unknown refresh type"); + NS_ERROR("Unknown refresh type"); return SetErrorInfo(E_UNEXPECTED); } diff --git a/embedding/components/commandhandler/src/nsCommandParams.h b/embedding/components/commandhandler/src/nsCommandParams.h index be06f7815c5e..daca37a0298c 100644 --- a/embedding/components/commandhandler/src/nsCommandParams.h +++ b/embedding/components/commandhandler/src/nsCommandParams.h @@ -110,7 +110,7 @@ protected: mISupports = inRHS.mISupports.get(); // additional addref break; default: - NS_ASSERTION(0, "Unknown type"); + NS_ERROR("Unknown type"); } } @@ -134,7 +134,7 @@ protected: case eISupportsType: mISupports = nsnull; break; // clear the nsCOMPtr case eStringType: delete mData.mCString; mData.mCString = nsnull; break; default: - NS_ASSERTION(0, "Unknown type"); + NS_ERROR("Unknown type"); } mEntryType = inNewType; diff --git a/gfx/src/thebes/nsThebesDeviceContext.cpp b/gfx/src/thebes/nsThebesDeviceContext.cpp index 93ef106d4589..c6e8e9f9276d 100644 --- a/gfx/src/thebes/nsThebesDeviceContext.cpp +++ b/gfx/src/thebes/nsThebesDeviceContext.cpp @@ -1256,7 +1256,7 @@ nsThebesDeviceContext::CalcPrintingSize() } #endif default: - NS_ASSERTION(0, "trying to print to unknown surface type"); + NS_ERROR("trying to print to unknown surface type"); } if (inPoints) { @@ -1315,7 +1315,7 @@ nsThebesDeviceContext::GetPrintHDC() #endif default: - NS_ASSERTION(0, "invalid surface type in GetPrintHDC"); + NS_ERROR("invalid surface type in GetPrintHDC"); break; } } diff --git a/gfx/thebes/src/gfxFT2Fonts.cpp b/gfx/thebes/src/gfxFT2Fonts.cpp index b8e038b9d2d1..9d78c11f454e 100644 --- a/gfx/thebes/src/gfxFT2Fonts.cpp +++ b/gfx/thebes/src/gfxFT2Fonts.cpp @@ -708,7 +708,7 @@ gfxFT2Font::GetMetrics() // save the space glyph mSpaceGlyph = gid; } else { - NS_ASSERTION(0, "blah"); + NS_ERROR("blah"); } // properties of 'x', also use its width as average width diff --git a/intl/locale/src/os2/nsCollationOS2.cpp b/intl/locale/src/os2/nsCollationOS2.cpp index 37af24601d46..d914640fffe3 100644 --- a/intl/locale/src/os2/nsCollationOS2.cpp +++ b/intl/locale/src/os2/nsCollationOS2.cpp @@ -83,7 +83,7 @@ nsresult nsCollationOS2::Initialize(nsILocale *locale) mCollation = new nsCollation; if (mCollation == NULL) { - NS_ASSERTION(0, "mCollation creation failed"); + NS_ERROR("mCollation creation failed"); return NS_ERROR_OUT_OF_MEMORY; } diff --git a/intl/locale/src/unix/nsCollationUnix.cpp b/intl/locale/src/unix/nsCollationUnix.cpp index 463194c53d93..ed5e4a6a73a6 100644 --- a/intl/locale/src/unix/nsCollationUnix.cpp +++ b/intl/locale/src/unix/nsCollationUnix.cpp @@ -91,7 +91,7 @@ nsresult nsCollationUnix::Initialize(nsILocale* locale) mCollation = new nsCollation; if (mCollation == NULL) { - NS_ASSERTION(0, "mCollation creation failed"); + NS_ERROR("mCollation creation failed"); return NS_ERROR_OUT_OF_MEMORY; } diff --git a/intl/strres/src/nsStringBundleTextOverride.cpp b/intl/strres/src/nsStringBundleTextOverride.cpp index 5075d6f3c741..130be458e265 100644 --- a/intl/strres/src/nsStringBundleTextOverride.cpp +++ b/intl/strres/src/nsStringBundleTextOverride.cpp @@ -96,7 +96,7 @@ URLPropertyElement::SetKey(const nsACString& aKey) // the url, and set that as the key. However, that would require // us to hold onto a copy of the string, and that's a waste, // considering nobody should ever be calling this. - NS_ASSERTION(0, "This makes no sense!"); + NS_ERROR("This makes no sense!"); return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/intl/uconv/src/nsUNIXCharset.cpp b/intl/uconv/src/nsUNIXCharset.cpp index 39157e9fdc38..ad991a625816 100644 --- a/intl/uconv/src/nsUNIXCharset.cpp +++ b/intl/uconv/src/nsUNIXCharset.cpp @@ -126,7 +126,7 @@ nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale return NS_OK; } } - NS_ASSERTION(0, "unable to convert locale to charset using deprecated config"); + NS_ERROR("unable to convert locale to charset using deprecated config"); mCharset.AssignLiteral("ISO-8859-1"); oResult.AssignLiteral("ISO-8859-1"); return NS_SUCCESS_USING_FALLBACK_LOCALE; @@ -205,7 +205,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS if (NS_SUCCEEDED(res)) return res; - NS_ASSERTION(0, "unable to convert locale to charset using deprecated config"); + NS_ERROR("unable to convert locale to charset using deprecated config"); oResult.AssignLiteral("ISO-8859-1"); return NS_SUCCESS_USING_FALLBACK_LOCALE; } @@ -302,7 +302,7 @@ nsPlatformCharset::InitGetCharset(nsACString &oString) } } - NS_ASSERTION(0, "unable to use nl_langinfo(CODESET)"); + NS_ERROR("unable to use nl_langinfo(CODESET)"); #endif // @@ -345,7 +345,7 @@ nsPlatformCharset::Init() } // last resort fallback - NS_ASSERTION(0, "unable to convert locale to charset using deprecated config"); + NS_ERROR("unable to convert locale to charset using deprecated config"); mCharset.AssignLiteral("ISO-8859-1"); return NS_SUCCESS_USING_FALLBACK_LOCALE; } @@ -368,7 +368,7 @@ nsPlatformCharset::VerifyCharset(nsCString &aCharset) nsCOMPtr enc; res = charsetConverterManager->GetUnicodeEncoder(aCharset.get(), getter_AddRefs(enc)); if (NS_FAILED(res)) { - NS_ASSERTION(0, "failed to create encoder"); + NS_ERROR("failed to create encoder"); return res; } @@ -378,7 +378,7 @@ nsPlatformCharset::VerifyCharset(nsCString &aCharset) nsCOMPtr dec; res = charsetConverterManager->GetUnicodeDecoder(aCharset.get(), getter_AddRefs(dec)); if (NS_FAILED(res)) { - NS_ASSERTION(0, "failed to create decoder"); + NS_ERROR("failed to create decoder"); return res; } diff --git a/intl/uconv/util/nsUCSupport.cpp b/intl/uconv/util/nsUCSupport.cpp index ea3ced176a9e..c3bcf944c86f 100644 --- a/intl/uconv/util/nsUCSupport.cpp +++ b/intl/uconv/util/nsUCSupport.cpp @@ -167,7 +167,7 @@ NS_IMETHODIMP nsBufferDecoderSupport::Convert(const char * aSrc, if ((res == NS_OK_UDEC_MOREINPUT) && (bcw == 0)) { res = NS_ERROR_UNEXPECTED; #if defined(DEBUG_yokoyama) || defined(DEBUG_ftang) - NS_ASSERTION(0, "This should not happen. Internal buffer may be corrupted."); + NS_ERROR("This should not happen. Internal buffer may be corrupted."); #endif break; } else { @@ -176,7 +176,7 @@ NS_IMETHODIMP nsBufferDecoderSupport::Convert(const char * aSrc, src -= mBufferLength - buffLen; mBufferLength = buffLen; #if defined(DEBUG_yokoyama) || defined(DEBUG_ftang) - NS_ASSERTION(0, "This should not happen. Internal buffer may be corrupted."); + NS_ERROR("This should not happen. Internal buffer may be corrupted."); #endif } else { // the buffer and some extra data was converted - unget the rest diff --git a/js/jsd/jsd_xpc.cpp b/js/jsd/jsd_xpc.cpp index d210fba914b6..aae12ef7b876 100644 --- a/js/jsd/jsd_xpc.cpp +++ b/js/jsd/jsd_xpc.cpp @@ -437,7 +437,7 @@ jsds_FilterHook (JSDContext *jsdc, JSDThreadState *state) } break; default: - NS_ASSERTION(0, "Invalid pattern type"); + NS_ERROR("Invalid pattern type"); } } } diff --git a/js/src/xpconnect/src/XPCDispObject.cpp b/js/src/xpconnect/src/XPCDispObject.cpp index 75c473e44f08..c25736dee0cc 100644 --- a/js/src/xpconnect/src/XPCDispObject.cpp +++ b/js/src/xpconnect/src/XPCDispObject.cpp @@ -305,7 +305,7 @@ JSBool XPCDispObject::Invoke(XPCCallContext & ccx, CallMode mode) secAction = nsIXPCSecurityManager::ACCESS_SET_PROPERTY; break; default: - NS_ASSERTION(0,"bad value"); + NS_ERROR("bad value"); return JS_FALSE; } jsval name = member->GetName(); diff --git a/js/src/xpconnect/src/xpcconvert.cpp b/js/src/xpconnect/src/xpcconvert.cpp index bddb7d5a5fc2..a9b02d6f8d41 100644 --- a/js/src/xpconnect/src/xpcconvert.cpp +++ b/js/src/xpconnect/src/xpcconvert.cpp @@ -481,7 +481,7 @@ XPCConvert::NativeData2JS(XPCLazyCallContext& lccx, jsval* d, const void* s, break; } default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); return JS_FALSE; } } @@ -620,7 +620,7 @@ XPCConvert::JSData2Native(XPCCallContext& ccx, void* d, jsval s, default: if(!type.IsPointer()) { - NS_ASSERTION(0,"unsupported type"); + NS_ERROR("unsupported type"); return JS_FALSE; } @@ -628,7 +628,7 @@ XPCConvert::JSData2Native(XPCCallContext& ccx, void* d, jsval s, { case nsXPTType::T_VOID: XPC_LOG_ERROR(("XPCConvert::JSData2Native : void* params not supported")); - NS_ASSERTION(0,"void* params not supported"); + NS_ERROR("void* params not supported"); return JS_FALSE; case nsXPTType::T_IID: { @@ -1017,7 +1017,7 @@ XPCConvert::JSData2Native(XPCCallContext& ccx, void* d, jsval s, nsnull, pErr); } default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); return JS_FALSE; } } @@ -1597,7 +1597,7 @@ XPCConvert::JSValToXPCException(XPCCallContext& ccx, if(!obj) { - NS_ASSERTION(0, "when is an object not an object?"); + NS_ERROR("when is an object not an object?"); return NS_ERROR_FAILURE; } @@ -1991,17 +1991,17 @@ XPCConvert::NativeArray2JS(XPCLazyCallContext& lccx, case nsXPTType::T_BOOL : POPULATE(PRBool); break; case nsXPTType::T_CHAR : POPULATE(char); break; case nsXPTType::T_WCHAR : POPULATE(jschar); break; - case nsXPTType::T_VOID : NS_ASSERTION(0,"bad type"); goto failure; + case nsXPTType::T_VOID : NS_ERROR("bad type"); goto failure; case nsXPTType::T_IID : POPULATE(nsID*); break; - case nsXPTType::T_DOMSTRING : NS_ASSERTION(0,"bad type"); goto failure; + case nsXPTType::T_DOMSTRING : NS_ERROR("bad type"); goto failure; case nsXPTType::T_CHAR_STR : POPULATE(char*); break; case nsXPTType::T_WCHAR_STR : POPULATE(jschar*); break; case nsXPTType::T_INTERFACE : POPULATE(nsISupports*); break; case nsXPTType::T_INTERFACE_IS : POPULATE(nsISupports*); break; - case nsXPTType::T_UTF8STRING : NS_ASSERTION(0,"bad type"); goto failure; - case nsXPTType::T_CSTRING : NS_ASSERTION(0,"bad type"); goto failure; - case nsXPTType::T_ASTRING : NS_ASSERTION(0,"bad type"); goto failure; - default : NS_ASSERTION(0,"bad type"); goto failure; + case nsXPTType::T_UTF8STRING : NS_ERROR("bad type"); goto failure; + case nsXPTType::T_CSTRING : NS_ERROR("bad type"); goto failure; + case nsXPTType::T_ASTRING : NS_ERROR("bad type"); goto failure; + default : NS_ERROR("bad type"); goto failure; } if(pErr) @@ -2124,17 +2124,17 @@ fill_array: case nsXPTType::T_BOOL : POPULATE(na, PRBool); break; case nsXPTType::T_CHAR : POPULATE(na, char); break; case nsXPTType::T_WCHAR : POPULATE(na, jschar); break; - case nsXPTType::T_VOID : NS_ASSERTION(0,"bad type"); goto failure; + case nsXPTType::T_VOID : NS_ERROR("bad type"); goto failure; case nsXPTType::T_IID : POPULATE(fr, nsID*); break; - case nsXPTType::T_DOMSTRING : NS_ASSERTION(0,"bad type"); goto failure; + case nsXPTType::T_DOMSTRING : NS_ERROR("bad type"); goto failure; case nsXPTType::T_CHAR_STR : POPULATE(fr, char*); break; case nsXPTType::T_WCHAR_STR : POPULATE(fr, jschar*); break; case nsXPTType::T_INTERFACE : POPULATE(re, nsISupports*); break; case nsXPTType::T_INTERFACE_IS : POPULATE(re, nsISupports*); break; - case nsXPTType::T_UTF8STRING : NS_ASSERTION(0,"bad type"); goto failure; - case nsXPTType::T_CSTRING : NS_ASSERTION(0,"bad type"); goto failure; - case nsXPTType::T_ASTRING : NS_ASSERTION(0,"bad type"); goto failure; - default : NS_ASSERTION(0,"bad type"); goto failure; + case nsXPTType::T_UTF8STRING : NS_ERROR("bad type"); goto failure; + case nsXPTType::T_CSTRING : NS_ERROR("bad type"); goto failure; + case nsXPTType::T_ASTRING : NS_ERROR("bad type"); goto failure; + default : NS_ERROR("bad type"); goto failure; } *d = array; diff --git a/js/src/xpconnect/src/xpcjsid.cpp b/js/src/xpconnect/src/xpcjsid.cpp index 5dc561c7f4bf..ea850add2660 100644 --- a/js/src/xpconnect/src/xpcjsid.cpp +++ b/js/src/xpconnect/src/xpcjsid.cpp @@ -203,7 +203,7 @@ nsJSID::NewID(const char* str) { if(!str) { - NS_ASSERTION(0,"no string"); + NS_ERROR("no string"); return nsnull; } @@ -704,7 +704,7 @@ nsJSCID::NewID(const char* str) { if(!str) { - NS_ASSERTION(0,"no string"); + NS_ERROR("no string"); return nsnull; } diff --git a/js/src/xpconnect/src/xpcthreadcontext.cpp b/js/src/xpconnect/src/xpcthreadcontext.cpp index ff8fafeb2f6f..82cbc0161814 100644 --- a/js/src/xpconnect/src/xpcthreadcontext.cpp +++ b/js/src/xpconnect/src/xpcthreadcontext.cpp @@ -464,7 +464,7 @@ XPCPerThreadData::GetDataImpl(JSContext *cx) if(PR_FAILURE == PR_NewThreadPrivateIndex(&gTLSIndex, xpc_ThreadDataDtorCB)) { - NS_ASSERTION(0, "PR_NewThreadPrivateIndex failed!"); + NS_ERROR("PR_NewThreadPrivateIndex failed!"); gTLSIndex = BAD_TLS_INDEX; return nsnull; } @@ -477,14 +477,14 @@ XPCPerThreadData::GetDataImpl(JSContext *cx) data = new XPCPerThreadData(); if(!data || !data->IsValid()) { - NS_ASSERTION(0, "new XPCPerThreadData() failed!"); + NS_ERROR("new XPCPerThreadData() failed!"); if(data) delete data; return nsnull; } if(PR_FAILURE == PR_SetThreadPrivate(gTLSIndex, data)) { - NS_ASSERTION(0, "PR_SetThreadPrivate failed!"); + NS_ERROR("PR_SetThreadPrivate failed!"); delete data; return nsnull; } diff --git a/js/src/xpconnect/src/xpcwrappednative.cpp b/js/src/xpconnect/src/xpcwrappednative.cpp index f58310f62feb..82098b9944d0 100644 --- a/js/src/xpconnect/src/xpcwrappednative.cpp +++ b/js/src/xpconnect/src/xpcwrappednative.cpp @@ -2289,7 +2289,7 @@ XPCWrappedNative::CallMethod(XPCCallContext& ccx, secAction = nsIXPCSecurityManager::ACCESS_SET_PROPERTY; break; default: - NS_ASSERTION(0,"bad value"); + NS_ERROR("bad value"); return JS_FALSE; } @@ -2852,7 +2852,7 @@ done: i, GET_LENGTH, dispatchParams, &array_count)) { - NS_ASSERTION(0,"failed to get array length, we'll leak here"); + NS_ERROR("failed to get array length, we'll leak here"); continue; } if(dp->IsValAllocated()) @@ -3730,7 +3730,7 @@ XPCJSObjectHolder::newHolder(XPCCallContext& ccx, JSObject* obj) { if(!obj) { - NS_ASSERTION(0, "bad param"); + NS_ERROR("bad param"); return nsnull; } return new XPCJSObjectHolder(ccx, obj); diff --git a/js/src/xpconnect/src/xpcwrappednativeinfo.cpp b/js/src/xpconnect/src/xpcwrappednativeinfo.cpp index a6b076f06c3c..180880bd4353 100644 --- a/js/src/xpconnect/src/xpcwrappednativeinfo.cpp +++ b/js/src/xpconnect/src/xpcwrappednativeinfo.cpp @@ -436,7 +436,7 @@ XPCNativeInterface::NewInstance(XPCCallContext& ccx, str = JS_InternString(ccx, info->GetName()); if(!str) { - NS_ASSERTION(0,"bad method name"); + NS_ERROR("bad method name"); failed = JS_TRUE; break; } @@ -480,7 +480,7 @@ XPCNativeInterface::NewInstance(XPCCallContext& ccx, str = JS_InternString(ccx, constant->GetName()); if(!str) { - NS_ASSERTION(0,"bad constant name"); + NS_ERROR("bad constant name"); failed = JS_TRUE; break; } diff --git a/js/src/xpconnect/tests/TestXPC.cpp b/js/src/xpconnect/tests/TestXPC.cpp index 1c29d1535f9b..1eaafdeb6800 100644 --- a/js/src/xpconnect/tests/TestXPC.cpp +++ b/js/src/xpconnect/tests/TestXPC.cpp @@ -239,7 +239,7 @@ MySecMan::CanCreateWrapper(JSContext * aJSContext, const nsIID & aIID, nsISuppor "security exception"))); return NS_ERROR_FAILURE; default: - NS_ASSERTION(0,"bad case"); + NS_ERROR("bad case"); return NS_OK; } } @@ -257,7 +257,7 @@ MySecMan::CanCreateInstance(JSContext * aJSContext, const nsCID & aCID) "security exception"))); return NS_ERROR_FAILURE; default: - NS_ASSERTION(0,"bad case"); + NS_ERROR("bad case"); return NS_OK; } } @@ -275,7 +275,7 @@ MySecMan::CanGetService(JSContext * aJSContext, const nsCID & aCID) "security exception"))); return NS_ERROR_FAILURE; default: - NS_ASSERTION(0,"bad case"); + NS_ERROR("bad case"); return NS_OK; } } @@ -294,7 +294,7 @@ MySecMan::CanAccess(PRUint32 aAction, nsAXPCNativeCallContext *aCallContext, JSC "security exception"))); return NS_ERROR_FAILURE; default: - NS_ASSERTION(0,"bad case"); + NS_ERROR("bad case"); return NS_OK; } } diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 44b6b3b1e1c9..00a0418f4c88 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -11257,7 +11257,7 @@ nsCSSFrameConstructor::ReframeContainingBlock(nsIFrame* aFrame) if(isReflowing) { // don't ReframeContainingBlock, this will result in a crash // if we remove a tree that's in reflow - see bug 121368 for testcase - NS_ASSERTION(0, "Atemptted to nsCSSFrameConstructor::ReframeContainingBlock during a Reflow!!!"); + NS_ERROR("Atemptted to nsCSSFrameConstructor::ReframeContainingBlock during a Reflow!!!"); return NS_OK; } diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index 0d899e65577a..dabbc69c9126 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -2286,7 +2286,7 @@ nsTextControlFrame::OffsetToDOMPoint(PRInt32 aOffset, } } - NS_ASSERTION(0, "We should never get here!"); + NS_ERROR("We should never get here!"); return NS_ERROR_FAILURE; } diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 03e3dd3e2b25..70a2dc969745 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -5405,7 +5405,7 @@ nsIFrame::GetFrameFromDirection(nsDirection aDirection, PRBool aVisual, for (;lineFrameCount > 1;lineFrameCount --){ result = it->GetNextSiblingOnLine(lastFrame, thisLine); if (NS_FAILED(result) || !lastFrame){ - NS_ASSERTION(0,"should not be reached nsFrame\n"); + NS_ERROR("should not be reached nsFrame\n"); return NS_ERROR_FAILURE; } } diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index 1c8f79443ff5..cfcac2186d68 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -849,7 +849,7 @@ nsFrameSelection::FetchDesiredX(nscoord &aDesiredX) //the x position requested b { if (!mShell) { - NS_ASSERTION(0,"fetch desired X failed\n"); + NS_ERROR("fetch desired X failed\n"); return NS_ERROR_FAILURE; } if (mDesiredXSet) diff --git a/layout/mathml/nsMathMLmpaddedFrame.cpp b/layout/mathml/nsMathMLmpaddedFrame.cpp index f261f2290c04..f8c33b52b21f 100644 --- a/layout/mathml/nsMathMLmpaddedFrame.cpp +++ b/layout/mathml/nsMathMLmpaddedFrame.cpp @@ -326,7 +326,7 @@ nsMathMLmpaddedFrame::UpdateValue(PRInt32 aSign, default: // if we ever reach here, it would mean something is wrong // somewhere with the setup and/or the caller - NS_ASSERTION(0, "Unexpected Pseudo Unit"); + NS_ERROR("Unexpected Pseudo Unit"); return; } } diff --git a/modules/plugin/base/src/nsNPAPIPlugin.cpp b/modules/plugin/base/src/nsNPAPIPlugin.cpp index a4fd0af7ed60..fa1c96141fc6 100644 --- a/modules/plugin/base/src/nsNPAPIPlugin.cpp +++ b/modules/plugin/base/src/nsNPAPIPlugin.cpp @@ -707,7 +707,7 @@ MakeNewNPAPIStreamInternal(NPP npp, const char *relativeURL, const char *target, break; } default: - NS_ASSERTION(0, "how'd I get here"); + NS_ERROR("how'd I get here"); } return NPERR_NO_ERROR; diff --git a/security/manager/ssl/src/nsCipherInfo.cpp b/security/manager/ssl/src/nsCipherInfo.cpp index fa5eb3c5920c..712c3d12945b 100644 --- a/security/manager/ssl/src/nsCipherInfo.cpp +++ b/security/manager/ssl/src/nsCipherInfo.cpp @@ -86,7 +86,7 @@ nsCipherInfo::nsCipherInfo(PRUint16 aCipherId) if (!isGood) { - NS_ASSERTION(0, "unable to get info for implemented cipher"); + NS_ERROR("unable to get info for implemented cipher"); continue; } diff --git a/security/manager/ssl/src/nsCrypto.cpp b/security/manager/ssl/src/nsCrypto.cpp index 05cea53509f9..8b6bfd1d7d31 100644 --- a/security/manager/ssl/src/nsCrypto.cpp +++ b/security/manager/ssl/src/nsCrypto.cpp @@ -2108,7 +2108,7 @@ nsP12Runnable::Run() nsCOMPtr filePicker = do_CreateInstance("@mozilla.org/filepicker;1", &rv); if (!filePicker) { - NS_ASSERTION(0, "Could not create a file picker when backing up certs."); + NS_ERROR("Could not create a file picker when backing up certs."); return rv; } @@ -3014,7 +3014,7 @@ nsPkcs11::AddModule(const nsAString& aModuleName, case -2: return NS_ERROR_ILLEGAL_VALUE; } - NS_ASSERTION(0,"Bogus return value, this should never happen"); + NS_ERROR("Bogus return value, this should never happen"); return NS_ERROR_FAILURE; } diff --git a/security/manager/ssl/src/nsNSSASN1Object.cpp b/security/manager/ssl/src/nsNSSASN1Object.cpp index bc324c7685dd..055dc96c1134 100644 --- a/security/manager/ssl/src/nsNSSASN1Object.cpp +++ b/security/manager/ssl/src/nsNSSASN1Object.cpp @@ -184,7 +184,7 @@ buildASN1ObjectFromDER(unsigned char *data, type = nsIASN1Object::ASN1_PRIVATE; break; default: - NS_ASSERTION(0,"Bad DER"); + NS_ERROR("Bad DER"); return NS_ERROR_FAILURE; } sequence->SetTag(tagnum); diff --git a/security/manager/ssl/src/nsNSSCertHelper.cpp b/security/manager/ssl/src/nsNSSCertHelper.cpp index a39c85f1d45b..cc2d55aaa6f2 100755 --- a/security/manager/ssl/src/nsNSSCertHelper.cpp +++ b/security/manager/ssl/src/nsNSSCertHelper.cpp @@ -109,7 +109,7 @@ GetIntValue(SECItem *versionItem, srv = SEC_ASN1DecodeInteger(versionItem,version); if (srv != SECSuccess) { - NS_ASSERTION(0,"Could not decode version of cert"); + NS_ERROR("Could not decode version of cert"); return NS_ERROR_FAILURE; } return NS_OK; @@ -155,7 +155,7 @@ ProcessVersion(SECItem *versionItem, rv = nssComponent->GetPIPNSSBundleString("CertDumpVersion3", text); break; default: - NS_ASSERTION(0,"Bad value for cert version"); + NS_ERROR("Bad value for cert version"); rv = NS_ERROR_FAILURE; } diff --git a/security/manager/ssl/src/nsNSSCertificate.cpp b/security/manager/ssl/src/nsNSSCertificate.cpp index 42dee56ebfe7..ac987f6a2735 100644 --- a/security/manager/ssl/src/nsNSSCertificate.cpp +++ b/security/manager/ssl/src/nsNSSCertificate.cpp @@ -596,7 +596,7 @@ nsNSSCertificate::GetWindowTitle(char * *aWindowTitle) } } } else { - NS_ASSERTION(0,"Somehow got nsnull for mCertificate in nsNSSCertificate."); + NS_ERROR("Somehow got nsnull for mCertificate in nsNSSCertificate."); *aWindowTitle = nsnull; } return NS_OK; @@ -1641,12 +1641,12 @@ nsNSSCertList::AddCert(nsIX509Cert *aCert) cert = nssCert->GetCert(); if (cert == nsnull) { - NS_ASSERTION(0,"Somehow got nsnull for mCertificate in nsNSSCertificate."); + NS_ERROR("Somehow got nsnull for mCertificate in nsNSSCertificate."); return NS_ERROR_FAILURE; } if (mCertList == nsnull) { - NS_ASSERTION(0,"Somehow got nsnull for mCertList in nsNSSCertList."); + NS_ERROR("Somehow got nsnull for mCertList in nsNSSCertList."); return NS_ERROR_FAILURE; } CERT_AddCertToListTail(mCertList,cert); @@ -1664,12 +1664,12 @@ nsNSSCertList::DeleteCert(nsIX509Cert *aCert) CERTCertListNode *node; if (cert == nsnull) { - NS_ASSERTION(0,"Somehow got nsnull for mCertificate in nsNSSCertificate."); + NS_ERROR("Somehow got nsnull for mCertificate in nsNSSCertificate."); return NS_ERROR_FAILURE; } if (mCertList == nsnull) { - NS_ASSERTION(0,"Somehow got nsnull for mCertList in nsNSSCertList."); + NS_ERROR("Somehow got nsnull for mCertList in nsNSSCertList."); return NS_ERROR_FAILURE; } diff --git a/security/manager/ssl/src/nsNSSCertificateDB.cpp b/security/manager/ssl/src/nsNSSCertificateDB.cpp index 66f899b14e2e..c98470574ba0 100644 --- a/security/manager/ssl/src/nsNSSCertificateDB.cpp +++ b/security/manager/ssl/src/nsNSSCertificateDB.cpp @@ -447,7 +447,7 @@ nsNSSCertificateDB::handleCACertDownload(nsIArray *x509Certs, der.len = 0; if (!tmpCert2) { - NS_ASSERTION(0, "Couldn't create temp cert from DER blob\n"); + NS_ERROR("Couldn't create temp cert from DER blob\n"); continue; // Let's try to import the rest of 'em } @@ -1694,7 +1694,7 @@ NS_IMETHODIMP nsNSSCertificateDB::AddCertFromBase64(const char *aBase64, const c der.len = 0; if (!tmpCert) { - NS_ASSERTION(0,"Couldn't create cert from DER blob\n"); + NS_ERROR("Couldn't create cert from DER blob\n"); return NS_ERROR_FAILURE; } diff --git a/toolkit/components/downloads/src/nsDownloadManager.cpp b/toolkit/components/downloads/src/nsDownloadManager.cpp index b24c38a06721..deb5b2b8cce2 100644 --- a/toolkit/components/downloads/src/nsDownloadManager.cpp +++ b/toolkit/components/downloads/src/nsDownloadManager.cpp @@ -796,7 +796,7 @@ nsDownloadManager::InitDB() break; default: - NS_ASSERTION(0, "Unexpected value encountered for nsDownloadManager::mDBType"); + NS_ERROR("Unexpected value encountered for nsDownloadManager::mDBType"); break; } NS_ENSURE_SUCCESS(rv, rv); diff --git a/widget/src/beos/nsWindow.cpp b/widget/src/beos/nsWindow.cpp index 40c9f2e0e8be..1bd91c584372 100644 --- a/widget/src/beos/nsWindow.cpp +++ b/widget/src/beos/nsWindow.cpp @@ -1410,7 +1410,7 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor) break; default: - NS_ASSERTION(0, "Invalid cursor type"); + NS_ERROR("Invalid cursor type"); break; } NS_ASSERTION(newCursor != nsnull, "Cursor not stored in array properly!"); diff --git a/widget/src/cocoa/nsChildView.mm b/widget/src/cocoa/nsChildView.mm index fe8c68da71e5..27c6b1f0486a 100644 --- a/widget/src/cocoa/nsChildView.mm +++ b/widget/src/cocoa/nsChildView.mm @@ -771,7 +771,7 @@ void* nsChildView::GetNativeData(PRUint32 aDataType) break; case NS_NATIVE_GRAPHIC: - NS_ASSERTION(0, "Requesting NS_NATIVE_GRAPHIC on a Mac OS X child view!"); + NS_ERROR("Requesting NS_NATIVE_GRAPHIC on a Mac OS X child view!"); retVal = nsnull; break; diff --git a/widget/src/cocoa/nsCocoaWindow.mm b/widget/src/cocoa/nsCocoaWindow.mm index 0628997c8a38..fd107d343a74 100644 --- a/widget/src/cocoa/nsCocoaWindow.mm +++ b/widget/src/cocoa/nsCocoaWindow.mm @@ -531,7 +531,7 @@ void* nsCocoaWindow::GetNativeData(PRUint32 aDataType) case NS_NATIVE_GRAPHIC: // There isn't anything that makes sense to return here, // and it doesn't matter so just return nsnull. - NS_ASSERTION(0, "Requesting NS_NATIVE_GRAPHIC on a top-level window!"); + NS_ERROR("Requesting NS_NATIVE_GRAPHIC on a top-level window!"); break; } diff --git a/widget/src/cocoa/nsFilePicker.mm b/widget/src/cocoa/nsFilePicker.mm index 148097f491ff..8f1e291ed679 100644 --- a/widget/src/cocoa/nsFilePicker.mm +++ b/widget/src/cocoa/nsFilePicker.mm @@ -259,7 +259,7 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval) break; default: - NS_ASSERTION(0, "Unknown file picker mode"); + NS_ERROR("Unknown file picker mode"); break; } diff --git a/widget/src/cocoa/nsToolkit.mm b/widget/src/cocoa/nsToolkit.mm index ad88c60eca00..47b4464df685 100644 --- a/widget/src/cocoa/nsToolkit.mm +++ b/widget/src/cocoa/nsToolkit.mm @@ -161,7 +161,7 @@ nsToolkit::RegisterForSleepWakeNotifcations() gRootPort = ::IORegisterForSystemPower(0, ¬ifyPortRef, ToolkitSleepWakeCallback, &mPowerNotifier); if (gRootPort == MACH_PORT_NULL) { - NS_ASSERTION(0, "IORegisterForSystemPower failed"); + NS_ERROR("IORegisterForSystemPower failed"); return NS_ERROR_FAILURE; } diff --git a/widget/src/os2/nsDragService.cpp b/widget/src/os2/nsDragService.cpp index c006f5718d92..dd0f8591bda5 100644 --- a/widget/src/os2/nsDragService.cpp +++ b/widget/src/os2/nsDragService.cpp @@ -368,13 +368,13 @@ MRESULT EXPENTRY nsDragWindowProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2) NS_IMETHODIMP nsDragService::StartDragSession() { - NS_ASSERTION(0, "OS/2 version of StartDragSession() should never be called!"); + NS_ERROR("OS/2 version of StartDragSession() should never be called!"); return NS_OK; } NS_IMETHODIMP nsDragService::EndDragSession(PRBool aDragDone) { - NS_ASSERTION(0, "OS/2 version of EndDragSession() should never be called!"); + NS_ERROR("OS/2 version of EndDragSession() should never be called!"); return NS_OK; } diff --git a/widget/src/os2/nsWindow.cpp b/widget/src/os2/nsWindow.cpp index 8439956e836c..3e9c43659e6c 100644 --- a/widget/src/os2/nsWindow.cpp +++ b/widget/src/os2/nsWindow.cpp @@ -1592,7 +1592,7 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor) break; default: - NS_ASSERTION(0, "Invalid cursor type"); + NS_ERROR("Invalid cursor type"); break; } diff --git a/widget/src/photon/nsWidget.cpp b/widget/src/photon/nsWidget.cpp index 623c3e11a818..cf38a7cff1a5 100644 --- a/widget/src/photon/nsWidget.cpp +++ b/widget/src/photon/nsWidget.cpp @@ -245,7 +245,7 @@ NS_METHOD nsWidget::Show( PRBool bState ) { if( mWidget->rid == -1 ) { //EnableDamage( mWidget, PR_TRUE ); - NS_ASSERTION(0,"nsWidget::Show mWidget's rid == -1\n"); + NS_ERROR("nsWidget::Show mWidget's rid == -1\n"); mShown = PR_FALSE; return NS_ERROR_FAILURE; } @@ -544,7 +544,7 @@ NS_METHOD nsWidget::SetCursor( nsCursor aCursor ) { break; default: - NS_ASSERTION(0, "Invalid cursor type"); + NS_ERROR("Invalid cursor type"); break; } diff --git a/widget/src/windows/nsFilePicker.cpp b/widget/src/windows/nsFilePicker.cpp index e71ca2fe397b..922e868901c8 100644 --- a/widget/src/windows/nsFilePicker.cpp +++ b/widget/src/windows/nsFilePicker.cpp @@ -288,7 +288,7 @@ NS_IMETHODIMP nsFilePicker::ShowW(PRInt16 *aReturnVal) } #endif else { - NS_ASSERTION(0, "unsupported mode"); + NS_ERROR("unsupported mode"); } #ifndef WINCE } diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 4c3350bca5dd..25e140eca5e5 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -897,7 +897,7 @@ DWORD nsWindow::WindowStyle() break; default: - NS_ASSERTION(0, "unknown border style"); + NS_ERROR("unknown border style"); // fall through case eWindowType_toplevel: @@ -931,7 +931,7 @@ DWORD nsWindow::WindowExStyle() WS_EX_TOPMOST | WS_EX_TOOLWINDOW; default: - NS_ASSERTION(0, "unknown border style"); + NS_ERROR("unknown border style"); // fall through case eWindowType_toplevel: diff --git a/widget/src/windows/nsWindowCE.cpp b/widget/src/windows/nsWindowCE.cpp index 903c2f8d677b..2fb9a8e97977 100644 --- a/widget/src/windows/nsWindowCE.cpp +++ b/widget/src/windows/nsWindowCE.cpp @@ -292,7 +292,7 @@ DWORD nsWindow::WindowStyle() break; default: - NS_ASSERTION(0, "unknown border style"); + NS_ERROR("unknown border style"); // fall through case eWindowType_toplevel: diff --git a/xpcom/base/nsMemoryImpl.cpp b/xpcom/base/nsMemoryImpl.cpp index c7b6d0989332..c8e769aee102 100644 --- a/xpcom/base/nsMemoryImpl.cpp +++ b/xpcom/base/nsMemoryImpl.cpp @@ -92,7 +92,7 @@ mallocator(PRSize size, PRUint32& counter, PRUint32 max) { if (counter++ >= max) { counter = 0; - NS_ASSERTION(0, "about to fail allocation... watch out"); + NS_ERROR("about to fail allocation... watch out"); return nsnull; } return PR_Malloc(size); @@ -103,7 +103,7 @@ reallocator(void* ptr, PRSize size, PRUint32& counter, PRUint32 max) { if (counter++ >= max) { counter = 0; - NS_ASSERTION(0, "about to fail reallocation... watch out"); + NS_ERROR("about to fail reallocation... watch out"); return nsnull; } return PR_Realloc(ptr, size); diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp index 67f68306d341..7680779475c5 100644 --- a/xpcom/components/nsComponentManager.cpp +++ b/xpcom/components/nsComponentManager.cpp @@ -3189,7 +3189,7 @@ nsComponentManagerImpl::IsRegistered(const nsCID &aClass, { if (!aRegistered) { - NS_ASSERTION(0, "null ptr"); + NS_ERROR("null ptr"); return NS_ERROR_NULL_POINTER; } *aRegistered = (nsnull != GetFactoryEntry(aClass)); diff --git a/xpcom/obsolete/nsFileSpec.cpp b/xpcom/obsolete/nsFileSpec.cpp index aca54a688ff6..2c20fe25d11f 100644 --- a/xpcom/obsolete/nsFileSpec.cpp +++ b/xpcom/obsolete/nsFileSpec.cpp @@ -796,7 +796,7 @@ nsFileSpec::nsFileSpec() //---------------------------------------------------------------------------------------- : mError(NS_OK) // XXX shouldn't this be NS_ERROR_NOT_INITIALIZED? { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); } //---------------------------------------------------------------------------------------- @@ -916,7 +916,7 @@ nsFileSpec::nsFileSpec(const nsFilePath& inPath) : mPath((const char*)inPath) , mError(NS_OK) { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); } //---------------------------------------------------------------------------------------- @@ -935,7 +935,7 @@ nsFileSpec::nsFileSpec(const nsFileSpec& inSpec) : mPath(inSpec.mPath) , mError(NS_OK) { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); } //---------------------------------------------------------------------------------------- @@ -944,7 +944,7 @@ nsFileSpec::nsFileSpec(const char* inString, PRBool inCreateDirs) : mPath(inString) , mError(NS_OK) { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); // Make canonical and absolute. nsFileSpecHelpers::Canonify(mPath, inCreateDirs); } @@ -955,7 +955,7 @@ nsFileSpec::nsFileSpec(const nsString& inString, PRBool inCreateDirs) : mPath(inString) , mError(NS_OK) { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); // Make canonical and absolute. nsFileSpecHelpers::Canonify(mPath, inCreateDirs); } diff --git a/xpcom/obsolete/nsFileSpecImpl.cpp b/xpcom/obsolete/nsFileSpecImpl.cpp index 884125fdf2b4..3c730b031290 100644 --- a/xpcom/obsolete/nsFileSpecImpl.cpp +++ b/xpcom/obsolete/nsFileSpecImpl.cpp @@ -62,7 +62,7 @@ nsFileSpecImpl::nsFileSpecImpl() : mInputStream(nsnull) , mOutputStream(nsnull) { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); } @@ -73,7 +73,7 @@ nsFileSpecImpl::nsFileSpecImpl(const nsFileSpec& inSpec) , mInputStream(nsnull) , mOutputStream(nsnull) { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); } diff --git a/xpcom/obsolete/nsFileSpecOS2.cpp b/xpcom/obsolete/nsFileSpecOS2.cpp index f8f3a5c40c61..40c5b0e0e36e 100644 --- a/xpcom/obsolete/nsFileSpecOS2.cpp +++ b/xpcom/obsolete/nsFileSpecOS2.cpp @@ -206,7 +206,7 @@ void nsFileSpecHelpers::NativeToUnix(nsSimpleCharString& ioPath) nsFileSpec::nsFileSpec(const nsFilePath& inPath) //---------------------------------------------------------------------------------------- { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); *this = inPath; } diff --git a/xpcom/obsolete/nsFileSpecWin.cpp b/xpcom/obsolete/nsFileSpecWin.cpp index 7489fbd5ef1b..fd00c4dd2ebc 100644 --- a/xpcom/obsolete/nsFileSpecWin.cpp +++ b/xpcom/obsolete/nsFileSpecWin.cpp @@ -182,7 +182,7 @@ void nsFileSpecHelpers::NativeToUnix(nsSimpleCharString& ioPath) nsFileSpec::nsFileSpec(const nsFilePath& inPath) //---------------------------------------------------------------------------------------- { -// NS_ASSERTION(0, "nsFileSpec is unsupported - use nsIFile!"); +// NS_ERROR("nsFileSpec is unsupported - use nsIFile!"); *this = inPath; } diff --git a/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp b/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp index 37339877b984..08ad1595b2e7 100644 --- a/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp +++ b/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp @@ -150,7 +150,7 @@ asm(".text\n\t" #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_alpha_openbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_alpha_openbsd.cpp index fa7bb6591414..46ef41c1b6a9 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_alpha_openbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_alpha_openbsd.cpp @@ -119,7 +119,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) case nsXPTType::T_CHAR : dp->val.c = (char) *ap; break; case nsXPTType::T_WCHAR : dp->val.wc = (PRUnichar) *ap; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -226,7 +226,7 @@ __asm__( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_openbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_openbsd.cpp index 2b055068e81b..08e7e656214b 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_openbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_openbsd.cpp @@ -143,7 +143,7 @@ PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex, case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -227,7 +227,7 @@ asm(".section \".text\"\n\t" #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp index a8cda53904ee..0982415d58cb 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp @@ -124,7 +124,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) case nsXPTType::T_CHAR : dp->val.c = *((char*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -255,7 +255,7 @@ nsresult nsXPTCStubBase::Stub##n () \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp index 47c09a421962..b03d7bf03e7e 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp @@ -98,7 +98,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) case nsXPTType::T_CHAR : dp->val.c = *((char*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -138,7 +138,7 @@ __asm__( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_openbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_openbsd.cpp index 4f7cc2853212..c78a5487fe7e 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_openbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_openbsd.cpp @@ -114,7 +114,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) case nsXPTType::T_CHAR : dp->val.c = *((char*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -245,7 +245,7 @@ nsresult nsXPTCStubBase::Stub##n () \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp index 4f98182d797f..6767f0f7c03d 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp @@ -177,7 +177,7 @@ asm(".text\n\t" #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp index be43167b9cb4..89c151e675fb 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp @@ -124,7 +124,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, case nsXPTType::T_CHAR : dp->val.c = *(iargs); break; case nsXPTType::T_WCHAR : dp->val.wc = *(iargs); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } if (i < 7) @@ -175,7 +175,7 @@ PRUint64 a8) \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp index a8c2c8337e02..820335fd5928 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp @@ -127,7 +127,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, case nsXPTType::T_CHAR : dp->val.c = *(iargs); break; case nsXPTType::T_WCHAR : dp->val.wc = *(iargs); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } if (i < 7) @@ -178,7 +178,7 @@ PRUint64 a8) \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_irix.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_irix.cpp index 556b5bbead42..b98e5333ce12 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_irix.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_irix.cpp @@ -197,7 +197,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args, break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -217,7 +217,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args, #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp index 57004b4156d2..67aa1a905704 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp @@ -116,7 +116,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) case nsXPTType::T_CHAR : dp->val.c = (char) *ap; break; case nsXPTType::T_WCHAR : dp->val.wc = (PRUnichar) *ap; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -223,7 +223,7 @@ __asm__( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp index 7ecc77c863c0..1f01632fdc56 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp @@ -99,7 +99,7 @@ extern "C" { case nsXPTType::T_CHAR : dp->val.c = *(((char*) ap) + 3); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -123,7 +123,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp index d41e6dd0d4e7..e2e0a46d3f27 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp @@ -166,7 +166,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, dp->val.wc = *((PRUint32*)a_ov ), a_ov++; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -207,7 +207,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp index 5091b6439908..3e6aa82ea5b4 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp @@ -166,7 +166,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, dp->val.wc = *((PRUint64*)a_ov ), a_ov++; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -211,7 +211,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp index bdce59c4f91b..730dc1c332dd 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp @@ -119,7 +119,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args) #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp index 4069a6bccd00..ea50a2f16480 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp @@ -107,7 +107,7 @@ extern "C" { // wchar_t is an int (32 bits) on NetBSD case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -140,7 +140,7 @@ __asm__( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_arm.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_arm.cpp index fb0960d6c854..48fb999f7333 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_arm.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_arm.cpp @@ -106,7 +106,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) case nsXPTType::T_CHAR : dp->val.c = *((char*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -237,7 +237,7 @@ nsresult nsXPTCStubBase::Stub##n () \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_shle.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_shle.cpp index f6927fba3fbb..abd897afd76d 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_shle.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_shle.cpp @@ -129,7 +129,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, int methodIndex, PRUint32* data, #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_openvms_alpha.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_openvms_alpha.cpp index c4d1b364b199..f4f652ab9ebe 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_openvms_alpha.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_openvms_alpha.cpp @@ -116,7 +116,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) case nsXPTType::T_CHAR : dp->val.c = (char) *ap; break; case nsXPTType::T_WCHAR : dp->val.wc = (PRUnichar) *ap; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -138,7 +138,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_osf1_alpha.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_osf1_alpha.cpp index cd8fe40be88c..7674016771e8 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_osf1_alpha.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_osf1_alpha.cpp @@ -116,7 +116,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) case nsXPTType::T_CHAR : dp->val.c = (char) *ap; break; case nsXPTType::T_WCHAR : dp->val.wc = (PRUnichar) *ap; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -141,7 +141,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp index 89b44ac27e6e..d0d6ad8fbfe8 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp @@ -142,7 +142,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) args); break; case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) args); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } ++regwords; @@ -167,7 +167,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp index 84ad145178a4..8e6550d4073e 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp @@ -153,7 +153,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, else if (type == nsXPTType::T_WCHAR) dp->val.wc = (wchar_t) tempu64; else - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); } if (i >= 7) @@ -238,7 +238,7 @@ __asm__ ( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp index 7f609c9833ae..533160489ac1 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp @@ -190,7 +190,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args, P dp->val.wc = (wchar_t) *ap++; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -208,7 +208,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args, P #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp index 995e90322940..cf772d2a0b52 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp @@ -177,7 +177,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args, P dp->val.wc = (wchar_t) *ap++; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -195,7 +195,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args, P #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp index 846583be45a5..340be5196981 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp @@ -163,7 +163,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) tempu32; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -241,7 +241,7 @@ __asm__ ( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp index 68d572ca8d7b..06146d21e005 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp @@ -174,7 +174,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) tempu32; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -210,7 +210,7 @@ __asm__ ( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_openbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_openbsd.cpp index 672ab0808327..d17426efc42f 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_openbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_openbsd.cpp @@ -163,7 +163,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) tempu32; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -241,7 +241,7 @@ __asm__ ( \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp index 9c4193f51e9c..8001ff9d495b 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp @@ -172,7 +172,7 @@ PrepareAndDispatch( argIndex++; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -191,7 +191,7 @@ PrepareAndDispatch( #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp index 2af90c151330..848e29802b0d 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp @@ -104,7 +104,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args) case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break; case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -129,7 +129,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp index cbed60419a48..7e152216c8f5 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp @@ -110,7 +110,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args) case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -137,7 +137,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_openbsd.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_openbsd.cpp index 10e4b2fa0317..e699dda5e9f3 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_openbsd.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_openbsd.cpp @@ -113,7 +113,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args) case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -140,7 +140,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp index 9a143801b66e..cbf29298833a 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp @@ -107,7 +107,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args) case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -132,7 +132,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp index feb98cb66610..274f8d3f26bd 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp @@ -101,7 +101,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args) case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -126,7 +126,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp index 00ffe7260de7..0c6f78a6027e 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp @@ -169,7 +169,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp index d3f5dac632c3..26e22ab0ce78 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp @@ -145,7 +145,7 @@ PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex, case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -214,7 +214,7 @@ asm(".section \".text\",regular\n\t" #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp index 699113af0c65..a9f849b7ef5f 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp @@ -145,7 +145,7 @@ PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex, case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -229,7 +229,7 @@ asm(".section \".text\"\n\t" #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp index d5d371317b10..e43c9b2fb0e4 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp @@ -135,7 +135,7 @@ nsresult nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp b/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp index 5f3679a15a9b..b50614eb7fc1 100644 --- a/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp +++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp @@ -105,7 +105,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, case nsXPTType::T_CHAR : dp->val.c = *((char*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -176,7 +176,7 @@ nsresult __stdcall nsXPTCStubBase::Stub##n() \ #define SENTINEL_ENTRY(n) \ nsresult __stdcall nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_alpha.cpp b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_alpha.cpp index 69a10e705057..838aea010609 100644 --- a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_alpha.cpp +++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_alpha.cpp @@ -195,7 +195,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args, break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -215,7 +215,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args, #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64.cpp b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64.cpp index bde88fe43e6d..43938ad2a350 100644 --- a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64.cpp +++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64.cpp @@ -193,7 +193,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args, break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -211,7 +211,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args, #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } diff --git a/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp b/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp index 3891850ec3c5..36b70cbbb60c 100644 --- a/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp +++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubsce.cpp @@ -101,7 +101,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, case nsXPTType::T_CHAR : dp->val.c = *((char*) ap); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: - NS_ASSERTION(0, "bad type"); + NS_ERROR("bad type"); break; } } @@ -125,7 +125,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, #define SENTINEL_ENTRY(n) \ nsresult __stdcall nsXPTCStubBase::Sentinel##n() \ { \ - NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + NS_ERROR("nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } #include "xptcstubsdef.inc"