зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348464 - Part 1: Avoid two virtual calls in NS_URIChainHasFlags(); r=mcmanus
This commit is contained in:
Родитель
350b13d1d9
Коммит
2d24acd7f3
|
@ -68,6 +68,7 @@
|
|||
#include "nsISiteSecurityService.h"
|
||||
#include "nsHttpHandler.h"
|
||||
#include "nsNSSComponent.h"
|
||||
#include "nsIOService.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "nsINetworkManager.h"
|
||||
|
@ -1856,11 +1857,12 @@ NS_URIChainHasFlags(nsIURI *uri,
|
|||
uint32_t flags,
|
||||
bool *result)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsINetUtil> util = do_GetNetUtil(&rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// Avoid AddRef and Release'ing the IO service as this can show up in
|
||||
// profiles...
|
||||
auto ios = nsIOService::GetInstance();
|
||||
NS_ENSURE_TRUE(ios, NS_ERROR_FAILURE);
|
||||
|
||||
return util->URIChainHasFlags(uri, flags, result);
|
||||
return ios->URIChainHasFlags(uri, flags, result);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
|
Загрузка…
Ссылка в новой задаче