Bug 1799435 - Make RFP checks faster. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D161447
This commit is contained in:
Emilio Cobos Álvarez
2022-11-08 02:36:25 +00:00
parent 21a047b345
commit 12e596995e
22 changed files with 185 additions and 134 deletions

View File

@@ -5653,8 +5653,8 @@ void ClientWebGLContext::GetSupportedProfilesASTC(
bool ClientWebGLContext::ShouldResistFingerprinting() const {
if (mCanvasElement) {
// If we're constructed from a canvas element
return nsContentUtils::ShouldResistFingerprinting(GetOwnerDoc());
// If we're constructed from a canvas element.
return mCanvasElement->OwnerDoc()->ShouldResistFingerprinting();
}
if (mOffscreenCanvas) {
// If we're constructed from an offscreen canvas