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-07 22:23:50 +00:00
parent 89e3d43807
commit 79700d8de9
21 changed files with 176 additions and 132 deletions

View File

@@ -5645,8 +5645,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