Bug 1972600 - Spoof network connection for HTMLMediaElement preload. a=pascalc
Original Revision: https://phabricator.services.mozilla.com/D254027 Differential Revision: https://phabricator.services.mozilla.com/D255984
This commit is contained in:
committed by
pchevrel@mozilla.com
parent
a9402a5a1d
commit
3392ea7ae8
@@ -3130,6 +3130,9 @@ uint32_t HTMLMediaElement::GetPreloadDefault() const {
|
||||
if (mMediaSource) {
|
||||
return HTMLMediaElement::PRELOAD_METADATA;
|
||||
}
|
||||
if (ShouldResistFingerprinting(RFPTarget::NetworkConnection)) {
|
||||
return HTMLMediaElement::PRELOAD_METADATA;
|
||||
}
|
||||
if (OnCellularConnection()) {
|
||||
return Preferences::GetInt("media.preload.default.cellular",
|
||||
HTMLMediaElement::PRELOAD_NONE);
|
||||
@@ -3139,6 +3142,9 @@ uint32_t HTMLMediaElement::GetPreloadDefault() const {
|
||||
}
|
||||
|
||||
uint32_t HTMLMediaElement::GetPreloadDefaultAuto() const {
|
||||
if (ShouldResistFingerprinting(RFPTarget::NetworkConnection)) {
|
||||
return HTMLMediaElement::PRELOAD_ENOUGH;
|
||||
}
|
||||
if (OnCellularConnection()) {
|
||||
return Preferences::GetInt("media.preload.auto.cellular",
|
||||
HTMLMediaElement::PRELOAD_METADATA);
|
||||
|
||||
Reference in New Issue
Block a user