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 462488 9f6dc311b7fa154eaae3def3ab38413412ab8d29
parent 462487 e5162aed5ec0228cf24af6c22fa03c5e1963aea9
child 462489 fccf1be20f4b93514bf956a7c826c7990b4c89bd
push id35652
push usershindli@mozilla.com
push dateWed, 06 Mar 2019 04:36:55 +0000
treeherdermozilla-central@a83c218cd961 [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,