diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 8919457aae6..2c4014d9994 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -925,8 +925,14 @@ nsWebShell::OnLinkClick(nsIFrame* aFrame, const nsString& aTargetSpec, nsIPostData* aPostData) { - new OnLinkClickEvent(this, aURLSpec, aTargetSpec, aPostData); - return NS_OK; + OnLinkClickEvent* ev; + nsresult rv = NS_OK; + + ev = new OnLinkClickEvent(this, aURLSpec, aTargetSpec, aPostData); + if (nsnull == ev) { + rv = NS_ERROR_OUT_OF_MEMORY; + } + return rv; } // Find the web shell in the entire tree that we can reach that the @@ -1085,7 +1091,7 @@ class nsWebShellFactory : public nsIFactory { public: nsWebShellFactory(); - ~nsWebShellFactory(); + virtual ~nsWebShellFactory(); // nsISupports methods NS_IMETHOD QueryInterface(const nsIID &aIID, void **aResult); diff --git a/mozilla/uriloader/base/nsDocLoader.cpp b/mozilla/uriloader/base/nsDocLoader.cpp index bb219ce75ac..6cac4eb95ee 100644 --- a/mozilla/uriloader/base/nsDocLoader.cpp +++ b/mozilla/uriloader/base/nsDocLoader.cpp @@ -101,7 +101,7 @@ public: NS_IMETHOD_(PRBool) PromptPassword(const nsString &aText, nsString &aPassword); - PRInt32 GetStatus(void) { return mStatus; } + nsresult GetStatus(void) { return mStatus; } protected: virtual ~nsDocumentBindInfo(); @@ -116,7 +116,7 @@ protected: nsIStreamListener* m_NextStream; nsDocLoaderImpl* m_DocLoader; - PRInt32 mStatus; + nsresult mStatus; }; @@ -579,7 +579,7 @@ nsDocumentBindInfo::nsDocumentBindInfo(nsDocLoaderImpl* aDocLoader, m_ExtraInfo = aExtraInfo; NS_IF_ADDREF(m_ExtraInfo); - mStatus = NS_BINDING_SUCCEEDED; + mStatus = NS_OK; } nsDocumentBindInfo::~nsDocumentBindInfo() diff --git a/mozilla/webshell/src/nsDocLoader.cpp b/mozilla/webshell/src/nsDocLoader.cpp index bb219ce75ac..6cac4eb95ee 100644 --- a/mozilla/webshell/src/nsDocLoader.cpp +++ b/mozilla/webshell/src/nsDocLoader.cpp @@ -101,7 +101,7 @@ public: NS_IMETHOD_(PRBool) PromptPassword(const nsString &aText, nsString &aPassword); - PRInt32 GetStatus(void) { return mStatus; } + nsresult GetStatus(void) { return mStatus; } protected: virtual ~nsDocumentBindInfo(); @@ -116,7 +116,7 @@ protected: nsIStreamListener* m_NextStream; nsDocLoaderImpl* m_DocLoader; - PRInt32 mStatus; + nsresult mStatus; }; @@ -579,7 +579,7 @@ nsDocumentBindInfo::nsDocumentBindInfo(nsDocLoaderImpl* aDocLoader, m_ExtraInfo = aExtraInfo; NS_IF_ADDREF(m_ExtraInfo); - mStatus = NS_BINDING_SUCCEEDED; + mStatus = NS_OK; } nsDocumentBindInfo::~nsDocumentBindInfo() diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 8919457aae6..2c4014d9994 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -925,8 +925,14 @@ nsWebShell::OnLinkClick(nsIFrame* aFrame, const nsString& aTargetSpec, nsIPostData* aPostData) { - new OnLinkClickEvent(this, aURLSpec, aTargetSpec, aPostData); - return NS_OK; + OnLinkClickEvent* ev; + nsresult rv = NS_OK; + + ev = new OnLinkClickEvent(this, aURLSpec, aTargetSpec, aPostData); + if (nsnull == ev) { + rv = NS_ERROR_OUT_OF_MEMORY; + } + return rv; } // Find the web shell in the entire tree that we can reach that the @@ -1085,7 +1091,7 @@ class nsWebShellFactory : public nsIFactory { public: nsWebShellFactory(); - ~nsWebShellFactory(); + virtual ~nsWebShellFactory(); // nsISupports methods NS_IMETHOD QueryInterface(const nsIID &aIID, void **aResult);