From 624162386c870ec03815943282919fd5420cedc5 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Fri, 13 Feb 2015 21:36:42 +0200 Subject: [PATCH] Bug 1129795 - Remove some unnecessary code in docshell/base/. r=mccr8 --- docshell/base/nsAboutRedirector.cpp | 3 --- docshell/base/nsDefaultURIFixup.cpp | 10 ---------- docshell/base/nsDocShell.cpp | 6 ------ 3 files changed, 19 deletions(-) diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp index 310e277ac4c4..08f0689fc02d 100644 --- a/docshell/base/nsAboutRedirector.cpp +++ b/docshell/base/nsAboutRedirector.cpp @@ -188,9 +188,6 @@ nsresult nsAboutRedirector::Create(nsISupports* aOuter, REFNSIID aIID, void** aResult) { nsAboutRedirector* about = new nsAboutRedirector(); - if (!about) { - return NS_ERROR_OUT_OF_MEMORY; - } NS_ADDREF(about); nsresult rv = about->QueryInterface(aIID, aResult); NS_RELEASE(about); diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp index 27b2595a8577..c24efc719700 100644 --- a/docshell/base/nsDefaultURIFixup.cpp +++ b/docshell/base/nsDefaultURIFixup.cpp @@ -1117,16 +1117,6 @@ nsDefaultURIFixup::IsDomainWhitelisted(const nsAutoCString aAsciiHost, return Preferences::GetBool(pref.get(), false); } -nsresult -NS_NewURIFixup(nsIURIFixup** aURIFixup) -{ - nsDefaultURIFixup* fixup = new nsDefaultURIFixup; - if (!fixup) { - return NS_ERROR_OUT_OF_MEMORY; - } - return fixup->QueryInterface(NS_GET_IID(nsIURIFixup), (void**)aURIFixup); -} - /* Implementation of nsIURIFixupInfo */ NS_IMPL_ISUPPORTS(nsDefaultURIFixupInfo, nsIURIFixupInfo) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index a3b4028eb587..db4716bbc45f 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -690,9 +690,6 @@ SendPing(void* aClosure, nsIContent* aContent, nsIURI* aURI, // channel. The networking subsystem will take care of that for us. nsPingListener* pingListener = new nsPingListener(info->requireSameHost, aContent, loadGroup); - if (!pingListener) { - return; - } nsCOMPtr listener(pingListener); @@ -12772,9 +12769,6 @@ nsDocShell::EnsureTransferableHookData() { if (!mTransferableHookData) { mTransferableHookData = new nsTransferableHookData(); - if (!mTransferableHookData) { - return NS_ERROR_OUT_OF_MEMORY; - } } return NS_OK;