Bug 1532417 - Pass a document pointer to nsContentUtils::ShouldResistFingerprinting() callers in MediaError::GetMessage(); r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 05 Mar 2019 12:42:50 +0000
changeset 462505 9f6dc311b7fa154eaae3def3ab38413412ab8d29
parent 462504 e5162aed5ec0228cf24af6c22fa03c5e1963aea9
child 462506 fccf1be20f4b93514bf956a7c826c7990b4c89bd
push id79679
push usereakhgari@mozilla.com
push dateWed, 06 Mar 2019 00:58:45 +0000
treeherderautoland@9f6dc311b7fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1532417
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532417 - Pass a document pointer to nsContentUtils::ShouldResistFingerprinting() callers in MediaError::GetMessage(); r=baku Differential Revision: https://phabricator.services.mozilla.com/D22003
dom/html/MediaError.cpp
--- a/dom/html/MediaError.cpp
+++ b/dom/html/MediaError.cpp
@@ -62,17 +62,18 @@ void MediaError::GetMessage(nsAString& a
       // JavaScript console.
       nsContentUtils::ReportToConsoleNonLocalized(
           NS_ConvertASCIItoUTF16(message), nsIScriptError::warningFlag,
           NS_LITERAL_CSTRING("MediaError"), ownerDoc);
     }
   }
 
   if (!nsContentUtils::IsCallerChrome() &&
-      nsContentUtils::ShouldResistFingerprinting() && shouldBlank) {
+      nsContentUtils::ShouldResistFingerprinting(mParent->OwnerDoc()) &&
+      shouldBlank) {
     aResult.Truncate();
     return;
   }
 
   CopyUTF8toUTF16(mMessage, aResult);
 }
 
 JSObject* MediaError::WrapObject(JSContext* aCx,