Bug 1483597 - Remove the unneeded GetRootElement() check in bug 1261536, r=bz
authorTimothy Guan-tin Chien <timdream@gmail.com>
Wed, 15 Aug 2018 09:28:32 -0700
changeset 486889 5ca6befe8b6f5d64addfd0145ad0ad423d4373b5
parent 486888 96e45af1d9de74ecc146b97cac13aecfa9a54867
child 486890 a077bf122c05f9643ad66280d6b395b1751eff36
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1483597, 1261536
milestone63.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 1483597 - Remove the unneeded GetRootElement() check in bug 1261536, r=bz
dom/html/VideoDocument.cpp
--- a/dom/html/VideoDocument.cpp
+++ b/dom/html/VideoDocument.cpp
@@ -73,24 +73,22 @@ VideoDocument::StartDocumentLoad(const c
 void
 VideoDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject)
 {
   // Set the script global object on the superclass before doing
   // anything that might require it....
   MediaDocument::SetScriptGlobalObject(aScriptGlobalObject);
 
   if (aScriptGlobalObject && !InitialSetupHasBeenDone()) {
-    if (!GetRootElement()) {
-      // Create synthetic document
+    // Create synthetic document
 #ifdef DEBUG
-      nsresult rv =
+    nsresult rv =
 #endif
-        CreateSyntheticVideoDocument();
-      NS_ASSERTION(NS_SUCCEEDED(rv), "failed to create synthetic video document");
-    }
+      CreateSyntheticVideoDocument();
+    NS_ASSERTION(NS_SUCCEEDED(rv), "failed to create synthetic video document");
 
     if (!nsContentUtils::IsChildOfSameType(this)) {
       LinkStylesheet(NS_LITERAL_STRING("resource://content-accessible/TopLevelVideoDocument.css"));
       LinkStylesheet(NS_LITERAL_STRING("chrome://global/skin/media/TopLevelVideoDocument.css"));
       LinkScript(NS_LITERAL_STRING("chrome://global/content/TopLevelVideoDocument.js"));
     }
     InitialSetupDone();
   }