Bug 1234813 - sendBeacon should not throw if blocked by Content Policy. r=rbarnes

This commit is contained in:
Christoph Kerschbaumer 2015-12-23 11:50:05 -08:00
Родитель eac10123df
Коммит 1eafcb40c7
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -1342,10 +1342,9 @@ Navigator::SendBeacon(const nsAString& aUrl,
RefPtr<BeaconStreamListener> beaconListener = new BeaconStreamListener();
rv = channel->AsyncOpen2(beaconListener);
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return false;
}
// do not throw if security checks fail within asyncOpen2
NS_ENSURE_SUCCESS(rv, false);
// make the beaconListener hold a strong reference to the loadgroup
// which is released in ::OnStartRequest
beaconListener->SetLoadGroup(loadGroup);