mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-12 02:07:33 +09:00
Issue #1442 - Part 10b - Use nsIXHRSendable instead Blob/FormData/URLSearchParams. https://bugzilla.mozilla.org/show_bug.cgi?id=1329298 Pre-requisite for Part 11.
This commit is contained in:
parent
a4146b60a4
commit
a9520b2a7a
5 changed files with 18 additions and 50 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "mozilla/dom/ServiceWorkerContainer.h"
|
||||
#include "mozilla/dom/StorageManager.h"
|
||||
#include "mozilla/dom/TCPSocket.h"
|
||||
#include "mozilla/dom/URLSearchParams.h"
|
||||
#include "mozilla/dom/workers/RuntimeService.h"
|
||||
#include "mozilla/Hal.h"
|
||||
#include "nsISiteSpecificUserAgent.h"
|
||||
|
|
@ -877,12 +878,12 @@ Navigator::SendBeacon(const nsAString& aUrl,
|
|||
}
|
||||
|
||||
if (aData.Value().IsBlob()) {
|
||||
BodyExtractor<Blob> body(&aData.Value().GetAsBlob());
|
||||
BodyExtractor<nsIXHRSendable> body(&aData.Value().GetAsBlob());
|
||||
return SendBeaconInternal(aUrl, &body, /* isBlob */ true, aRv);
|
||||
}
|
||||
|
||||
if (aData.Value().IsFormData()) {
|
||||
BodyExtractor<FormData> body(&aData.Value().GetAsFormData());
|
||||
BodyExtractor<nsIXHRSendable> body(&aData.Value().GetAsFormData());
|
||||
return SendBeaconInternal(aUrl, &body, /* isBlob */ false, aRv);
|
||||
}
|
||||
|
||||
|
|
@ -892,7 +893,7 @@ Navigator::SendBeacon(const nsAString& aUrl,
|
|||
}
|
||||
|
||||
if (aData.Value().IsURLSearchParams()) {
|
||||
BodyExtractor<URLSearchParams> body(&aData.Value().GetAsURLSearchParams());
|
||||
BodyExtractor<nsIXHRSendable> body(&aData.Value().GetAsURLSearchParams());
|
||||
return SendBeaconInternal(aUrl, &body, /* isBlob */ false, aRv);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue