Backed out changeset b8b69c177520 (bug 1551320) for Browser-chrome failures on CreateElement in XUL documents
authorDorel Luca <dluca@mozilla.com>
Tue, 21 May 2019 03:05:12 +0300
changeset 474644 7047af39c5bb1f9cea9e0f6cc89566cc7db9b661
parent 474643 6ceb38a8197408f055b05b205bc412f2c77850a9
child 474645 2e560a9e4bcffc8476086c1da25c7412cd9a1805
push id36042
push userdvarga@mozilla.com
push dateTue, 21 May 2019 04:19:40 +0000
treeherdermozilla-central@ca560ff55451 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1551320
milestone69.0a1
backs outb8b69c177520654c6707b7cc20d5cc0d3d310573
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 b8b69c177520 (bug 1551320) for Browser-chrome failures on CreateElement in XUL documents
dom/base/Document.cpp
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -5478,24 +5478,16 @@ static PseudoStyleType GetPseudoElementT
 already_AddRefed<Element> Document::CreateElement(
     const nsAString& aTagName, const ElementCreationOptionsOrString& aOptions,
     ErrorResult& rv) {
   rv = nsContentUtils::CheckQName(aTagName, false);
   if (rv.Failed()) {
     return nullptr;
   }
 
-  // Temporary check until XULDocument has been removed.
-  if (IsXULDocument()) {
-    MOZ_DIAGNOSTIC_ASSERT(false,
-                          "CreateElement() not allowed in XUL document.");
-    rv.Throw(NS_ERROR_FAILURE);
-    return nullptr;
-  }
-
   bool needsLowercase = IsHTMLDocument() && !IsLowercaseASCII(aTagName);
   nsAutoString lcTagName;
   if (needsLowercase) {
     nsContentUtils::ASCIIToLower(aTagName, lcTagName);
   }
 
   const nsString* is = nullptr;
   PseudoStyleType pseudoType = PseudoStyleType::NotPseudo;