Backed out changeset 6b518e88bdf9 (bug 1450853) for perma failures on empty-samples.webm. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Tue, 14 Jul 2020 15:26:22 +0300
changeset 540385 df41fdf433a3624be684bd225eae90e3c452c509
parent 540384 29ff06b4a609067c76b8618bf191b4a658405e16
child 540386 d15ab3a0f7716110fad3159f9a3a7a26952ec183
push id121668
push userrmaries@mozilla.com
push dateTue, 14 Jul 2020 12:35:59 +0000
treeherderautoland@df41fdf433a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1450853
milestone80.0a1
backs out6b518e88bdf9f30c05c39694c134e16144293181
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
Backed out changeset 6b518e88bdf9 (bug 1450853) for perma failures on empty-samples.webm. CLOSED TREE
dom/html/HTMLMediaElement.cpp
dom/security/test/general/mochitest.ini
dom/security/test/general/test_bug1450853.html
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2346,30 +2346,17 @@ void HTMLMediaElement::AbortExistingLoad
   AssertReadyStateIsNothing();
 }
 
 void HTMLMediaElement::NoSupportedMediaSourceError(
     const nsACString& aErrorDetails) {
   if (mDecoder) {
     ShutdownDecoder();
   }
-
-  bool isThirdPartyLoad = false;
-  nsresult rv = mSrcAttrTriggeringPrincipal->IsThirdPartyURI(mLoadingSrc,
-                                                             &isThirdPartyLoad);
-  if (NS_SUCCEEDED(rv) && isThirdPartyLoad) {
-    // aErrorDetails can include sensitive details like MimeType or HTTP Status
-    // Code. In case we're loading a 3rd party resource we should not leak this
-    // and pass a Generic Error Message
-    mErrorSink->SetError(MEDIA_ERR_SRC_NOT_SUPPORTED,
-                         "Failed to open media"_ns);
-  } else {
-    mErrorSink->SetError(MEDIA_ERR_SRC_NOT_SUPPORTED, aErrorDetails);
-  }
-
+  mErrorSink->SetError(MEDIA_ERR_SRC_NOT_SUPPORTED, aErrorDetails);
   RemoveMediaTracks();
   ChangeDelayLoadStatus(false);
   UpdateAudioChannelPlayingState();
   RejectPromises(TakePendingPlayPromises(),
                  NS_ERROR_DOM_MEDIA_NOT_SUPPORTED_ERR);
 }
 
 typedef void (HTMLMediaElement::*SyncSectionFn)();
--- a/dom/security/test/general/mochitest.ini
+++ b/dom/security/test/general/mochitest.ini
@@ -58,9 +58,8 @@ skip-if = !debug
 [test_same_site_cookies_laxByDefault.html]
 skip-if =  debug
 support-files = closeWindow.sjs
 [test_xfo_error_page.html]
 support-files = file_xfo_error_page.sjs
 [test_sec_fetch_websocket.html]
 skip-if = toolkit == 'android' # no websocket support Bug 982828
 support-files = file_sec_fetch_websocket_wsh.py
-[test_bug1450853.html]
\ No newline at end of file
deleted file mode 100644
--- a/dom/security/test/general/test_bug1450853.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1450853
--->
-<head>
-<meta charset="utf-8">
-<title>Test for Cross-origin resouce status leak via MediaError</title>
-<script src="/tests/SimpleTest/SimpleTest.js"></script>
-<script src="/tests/SimpleTest/ChromeTask.js"></script>
-<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-
-<audio autoplay id="audio"></audio>
-
-<script type="application/javascript">
-
-/** Test for Bug 1450853 **/
-CONST_GENERIC_ERROR_MESSAGE = "Failed to open media";
-
-add_task(function() {
-  return new Promise((resolve) => {
-      let audioElement = document.getElementById("audio");
-
-      audioElement.onerror = function() {
-      let err = this.error;    
-      let message = err.message;
-      info(`Got Audio Error -> ${message}`);
-      ok(message.includes("404"), "Same-Origin Error Message may contain status data");
-      resolve();
-    };
-  audioElement.src = "/media/test.mp3";
-  });
-});
-
-add_task(function() {
-  return new Promise((resolve) => {
-      let audioElement = document.getElementById("audio");
-
-      audioElement.onerror = function() {
-      let err = this.error;    
-      let message = err.message;
-      
-      info(`Got Audio Error -> ${message}`);
-      is(message,CONST_GENERIC_ERROR_MESSAGE, "Cross-Origin Error Message is only Generic");
-      resolve();
-    };
-  audioElement.src = "https://example.com/media/test.mp3";
-  });
-});
-
-</script>
-</head>
-
-<body>
-    <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1450853">Mozilla Bug 1450853</a>
-    <iframe width="0" height="0"></iframe>
-  </body>
-</html>