зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1368962 P1 Expose LoadInfo::SynthesizeServiceWorkerTainting(). r=ckerschb
This commit is contained in:
Родитель
db983a3ae9
Коммит
c405b96cf8
|
@ -952,6 +952,13 @@ LoadInfo::MaybeIncreaseTainting(uint32_t aTainting)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
LoadInfo::SynthesizeServiceWorkerTainting(LoadTainting aTainting)
|
||||
{
|
||||
MOZ_DIAGNOSTIC_ASSERT(aTainting <= LoadTainting::Opaque);
|
||||
mTainting = aTainting;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LoadInfo::GetIsTopLevelLoad(bool *aResult)
|
||||
{
|
||||
|
|
|
@ -74,6 +74,14 @@ public:
|
|||
// when a separate request is made with the same security properties.
|
||||
already_AddRefed<nsILoadInfo> CloneForNewRequest() const;
|
||||
|
||||
// The service worker and fetch specifications require returning the
|
||||
// exact tainting level of the Response passed to FetchEvent.respondWith().
|
||||
// This method allows us to override the tainting level in that case.
|
||||
//
|
||||
// NOTE: This should not be used outside of service worker code! Use
|
||||
// nsILoadInfo::MaybeIncreaseTainting() instead.
|
||||
void SynthesizeServiceWorkerTainting(LoadTainting aTainting);
|
||||
|
||||
void SetIsPreflight();
|
||||
void SetUpgradeInsecureRequests();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче