Bug 308573 use if (NS_FAILED(...)) instead of if NS_FAILED(...)
patch by b.jacques@planet.nl r=darin sr=darin
This commit is contained in:
@@ -4703,7 +4703,7 @@ nsBookmarksService::LoadBookmarks()
|
||||
// Sets the default bookmarks root name.
|
||||
nsXPIDLString brName;
|
||||
rv = mBundle->GetStringFromName(NS_LITERAL_STRING("BookmarksRoot").get(), getter_Copies(brName));
|
||||
if NS_SUCCEEDED(rv) {
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// remove any previous NC_Name assertion
|
||||
nsCOMPtr<nsIRDFNode> oldName;
|
||||
rv = mInner->GetTarget(kNC_BookmarksRoot, kNC_Name, PR_TRUE, getter_AddRefs(oldName));
|
||||
|
||||
@@ -1989,7 +1989,7 @@ HTMLContentSink::Init(nsIDocument* aDoc,
|
||||
MOZ_TIMER_START(mWatch);
|
||||
|
||||
nsresult rv = nsContentSink::Init(aDoc, aURI, aContainer, aChannel);
|
||||
if NS_FAILED(rv) {
|
||||
if (NS_FAILED(rv)) {
|
||||
MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::Init()\n"));
|
||||
MOZ_TIMER_STOP(mWatch);
|
||||
return rv;
|
||||
|
||||
@@ -498,7 +498,7 @@ GetEncoding(const nsCString& aFontName, nsACString& aValue)
|
||||
// init the property now
|
||||
rv = NS_LoadPersistentPropertiesFromURISpec(&gFontEncodingProperties,
|
||||
NS_LITERAL_CSTRING("resource:/res/fonts/fontEncoding.properties"));
|
||||
if NS_FAILED(rv)
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ InitOperators(void)
|
||||
nsCOMPtr<nsIPersistentProperties> mathfontProp;
|
||||
rv = NS_LoadPersistentPropertiesFromURISpec(getter_AddRefs(mathfontProp),
|
||||
NS_LITERAL_CSTRING("resource://gre/res/fonts/mathfont.properties"));
|
||||
if NS_FAILED(rv) return rv;
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// Get the list of invariant chars
|
||||
for (PRInt32 i = 0; i < nsMathMLOperators::eMATHVARIANT_COUNT; ++i) {
|
||||
|
||||
@@ -107,7 +107,7 @@ nsHttpConnectionMgr::Init(PRUint16 maxConns,
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIEventTarget> sts = do_GetService(kSocketTransportServiceCID, &rv);
|
||||
if NS_FAILED(rv) return rv;
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoMonitor mon(mMonitor);
|
||||
|
||||
|
||||
@@ -3927,7 +3927,7 @@ PRBool nsWindow::OnDragDropMsg(ULONG msg, MPARAM mp1, MPARAM mp2, MRESULT &mr)
|
||||
}
|
||||
|
||||
// handle all possible outcomes without regard to their source
|
||||
if NS_SUCCEEDED(rv) {
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mDragStatus = gDragStatus = (dragFlags & DND_DragStatus);
|
||||
|
||||
if (dragFlags & DND_DispatchEnterEvent)
|
||||
|
||||
@@ -965,7 +965,7 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
|
||||
::ICStop(icInstance);
|
||||
}
|
||||
|
||||
if NS_FAILED(rv)
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
// We got an error getting the DL folder from IC so try finding the user's Desktop folder
|
||||
rv = GetOSXFolderType(kUserDomain, kDesktopFolderType, getter_AddRefs(localFile));
|
||||
|
||||
@@ -656,7 +656,7 @@ nsLocalFile::CopyDirectoryTo(nsIFile *newParent)
|
||||
PRBool dirCheck, isSymlink;
|
||||
PRUint32 oldPerms;
|
||||
|
||||
if NS_FAILED((rv = IsDirectory(&dirCheck)))
|
||||
if (NS_FAILED(rv = IsDirectory(&dirCheck)))
|
||||
return rv;
|
||||
if (!dirCheck)
|
||||
return CopyToNative(newParent, EmptyCString());
|
||||
|
||||
@@ -1199,7 +1199,7 @@ nsLDAPAutoCompleteSession::InitConnection()
|
||||
rv = mConnection->Init(host.get(), port,
|
||||
(options & nsILDAPURL::OPT_SECURE) ? PR_TRUE
|
||||
: PR_FALSE, mLogin, selfProxy, nsnull, mVersion);
|
||||
if NS_FAILED(rv) {
|
||||
if (NS_FAILED(rv)) {
|
||||
switch (rv) {
|
||||
|
||||
case NS_ERROR_OUT_OF_MEMORY:
|
||||
|
||||
Reference in New Issue
Block a user