Backed out changeset cd9ea65ce9b9 (bug 1258205) for issues in wpt-2 tests
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 15 Apr 2016 08:09:42 +0200
changeset 331223 8de93854b963a067cc672d99295b452058297be8
parent 331222 15a4d633bd2d983566e22a7989af17ed55fd9f21
child 331224 afd82f887093e5e9e4015115ca5795ec82a6f732
child 331226 87509ba26631087a731881e42f9ce8cc269e470f
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1258205
milestone48.0a1
backs outcd9ea65ce9b992abcd93782fa6932620c19184a8
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 cd9ea65ce9b9 (bug 1258205) for issues in wpt-2 tests
dom/base/Element.cpp
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1172,22 +1172,24 @@ Element::GetAttribute(const nsAString& a
   }
 }
 
 void
 Element::SetAttribute(const nsAString& aName,
                       const nsAString& aValue,
                       ErrorResult& aError)
 {
-  aError = nsContentUtils::CheckQName(aName, false);
-  if (aError.Failed()) {
-    return;
-  }
   const nsAttrName* name = InternalGetExistingAttrNameFromQName(aName);
+
   if (!name) {
+    aError = nsContentUtils::CheckQName(aName, false);
+    if (aError.Failed()) {
+      return;
+    }
+
     nsCOMPtr<nsIAtom> nameAtom;
     if (IsHTMLElement() && IsInHTMLDocument()) {
       nsAutoString lower;
       nsContentUtils::ASCIIToLower(aName, lower);
       nameAtom = NS_Atomize(lower);
     }
     else {
       nameAtom = NS_Atomize(aName);