зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1234813
- sendBeacon should not throw if blocked by Content Policy. r=rbarnes
This commit is contained in:
Родитель
eac10123df
Коммит
1eafcb40c7
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче