зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1293621 - Make sure that nsIOService::GetCachedProtocolHandler is called only on the main thread. r=jduell
--HG-- extra : rebase_source : de5224ef195dddd356a95a693224c6ac1554467c
This commit is contained in:
Родитель
3f3f8a21ec
Коммит
512654c1f7
|
@ -453,6 +453,8 @@ nsIOService::AsyncOnChannelRedirect(nsIChannel* oldChan, nsIChannel* newChan,
|
|||
nsresult
|
||||
nsIOService::CacheProtocolHandler(const char *scheme, nsIProtocolHandler *handler)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
for (unsigned int i=0; i<NS_N(gScheme); i++)
|
||||
{
|
||||
if (!nsCRT::strcasecmp(scheme, gScheme[i]))
|
||||
|
@ -480,6 +482,8 @@ nsIOService::CacheProtocolHandler(const char *scheme, nsIProtocolHandler *handle
|
|||
nsresult
|
||||
nsIOService::GetCachedProtocolHandler(const char *scheme, nsIProtocolHandler **result, uint32_t start, uint32_t end)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
uint32_t len = end - start - 1;
|
||||
for (unsigned int i=0; i<NS_N(gScheme); i++)
|
||||
{
|
||||
|
|
|
@ -170,7 +170,7 @@ private:
|
|||
nsCOMPtr<nsINetworkLinkService> mNetworkLinkService;
|
||||
bool mNetworkLinkServiceInitialized;
|
||||
|
||||
// Cached protocol handlers
|
||||
// Cached protocol handlers, only accessed on the main thread
|
||||
nsWeakPtr mWeakHandler[NS_N(gScheme)];
|
||||
|
||||
// cached categories
|
||||
|
|
Загрузка…
Ссылка в новой задаче