mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
check return values. don't compare a nsresult with NS_OK directory, use the macros.
This commit is contained in:
parent
76e708b0e2
commit
1c34c4a672
@ -282,19 +282,21 @@ nsBrowserAppCore::Init(const nsString& aId)
|
||||
nsresult rv = nsServiceManager::GetService(kAppCoresManagerCID,
|
||||
kIDOMAppCoresManagerIID,
|
||||
(nsISupports**)&appCoreManager);
|
||||
if (NS_OK == rv) {
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
appCoreManager->Add((nsIDOMBaseAppCore *)(nsBaseAppCore *)this);
|
||||
nsServiceManager::ReleaseService(kAppCoresManagerCID, appCoreManager);
|
||||
}
|
||||
|
||||
// Get the Global history service
|
||||
nsServiceManager::GetService(kCGlobalHistoryCID, kIGlobalHistoryIID,
|
||||
rv = nsServiceManager::GetService(kCGlobalHistoryCID, kIGlobalHistoryIID,
|
||||
(nsISupports **)&mGHistory);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kCSessionHistoryCID,
|
||||
nsnull,
|
||||
kISessionHistoryIID,
|
||||
(void **) &mSHistory);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
BeginObserving();
|
||||
|
||||
@ -338,7 +340,7 @@ nsBrowserAppCore::Reload(PRInt32 aType)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_IMETHODIMP
|
||||
nsBrowserAppCore::Forward()
|
||||
{
|
||||
GoForward(mContentAreaWebShell);
|
||||
|
Loading…
x
Reference in New Issue
Block a user