Bug 1192948 - Use channel->ascynOpen2 in uriloader/prefetch (r=smaug)

This commit is contained in:
Christoph Kerschbaumer 2015-08-27 19:45:30 -07:00
Родитель 97894bf634
Коммит c889fa94b1
2 изменённых файлов: 6 добавлений и 12 удалений

Просмотреть файл

@ -177,7 +177,7 @@ nsManifestCheck::Begin()
rv = NS_NewChannel(getter_AddRefs(mChannel),
mURI,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_NORMAL,
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // loadGroup
nullptr, // aCallbacks
@ -195,10 +195,7 @@ nsManifestCheck::Begin()
false);
}
rv = mChannel->AsyncOpen(this, nullptr);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
return mChannel->AsyncOpen2(this);
}
//-----------------------------------------------------------------------------
@ -371,7 +368,7 @@ nsOfflineCacheUpdateItem::OpenChannel(nsOfflineCacheUpdate *aUpdate)
rv = NS_NewChannel(getter_AddRefs(mChannel),
mURI,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_NORMAL,
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aLoadGroup
this, // aCallbacks
@ -403,7 +400,7 @@ nsOfflineCacheUpdateItem::OpenChannel(nsOfflineCacheUpdate *aUpdate)
false);
}
rv = mChannel->AsyncOpen(this, nullptr);
rv = mChannel->AsyncOpen2(this);
NS_ENSURE_SUCCESS(rv, rv);
mUpdate = aUpdate;

Просмотреть файл

@ -191,7 +191,7 @@ nsPrefetchNode::OpenChannel()
source,
source->NodePrincipal(),
nullptr, //aTriggeringPrincipal
nsILoadInfo::SEC_NORMAL,
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS,
nsIContentPolicy::TYPE_OTHER,
loadGroup, // aLoadGroup
this, // aCallbacks
@ -211,10 +211,7 @@ nsPrefetchNode::OpenChannel()
false);
}
rv = mChannel->AsyncOpen(this, nullptr);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
return mChannel->AsyncOpen2(this);
}
nsresult