Bug 1226760 - ViewSource doesn't work for packaged app resources r=mcmanus

* The packaged app service should use the URI of the channel, not the URI of the channel's principal.
This commit is contained in:
Valentin Gosu 2015-11-25 12:44:43 +01:00
Родитель aaa346467a
Коммит c62bdbfd66
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -1129,7 +1129,7 @@ PackagedAppService::GetResource(nsIChannel *aChannel,
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
nsCOMPtr<nsIURI> uri;
rv = principal->GetURI(getter_AddRefs(uri));
rv = aChannel->GetURI(getter_AddRefs(uri));
if (NS_WARN_IF(NS_FAILED(rv))) {
LOG(("[%p] > Error calling GetURI rv=%X\n", this, rv));
return rv;