Bug 729048 - Part 3: Replace call to nsParserService::CheckQName with nsContentUtils::CheckQName in nsXULDocument.cpp. r=hsivonen
authorMatias Juntunen <matias.juntunen@gmail.com>
Thu, 29 Mar 2012 17:31:40 -0400
changeset 93974 c2d8ac6bb09cbd96ead468c6c6f1cb0884d89a5f
parent 93973 7af2fcef270f45302408bcb65565aaa87b4d7d10
child 93975 db2978f38798c96f35b169a14564d455da948d7b
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs729048
milestone14.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 729048 - Part 3: Replace call to nsParserService::CheckQName with nsContentUtils::CheckQName in nsXULDocument.cpp. r=hsivonen
content/xul/document/src/nsXULDocument.cpp
--- a/content/xul/document/src/nsXULDocument.cpp
+++ b/content/xul/document/src/nsXULDocument.cpp
@@ -1352,21 +1352,19 @@ nsXULDocument::Persist(const nsAString& 
 
     nsCOMPtr<nsINodeInfo> ni = element->GetExistingAttrNameFromQName(aAttr);
     if (ni) {
         tag = ni->NameAtom();
         nameSpaceID = ni->NamespaceID();
     }
     else {
         // Make sure that this QName is going to be valid.
-        nsIParserService *parserService = nsContentUtils::GetParserService();
-        NS_ASSERTION(parserService, "Running scripts during shutdown?");
-
         const PRUnichar *colon;
-        rv = parserService->CheckQName(PromiseFlatString(aAttr), true, &colon);
+        rv = nsContentUtils::CheckQName(PromiseFlatString(aAttr), true, &colon);
+
         if (NS_FAILED(rv)) {
             // There was an invalid character or it was malformed.
             return NS_ERROR_INVALID_ARG;
         }
 
         if (colon) {
             // We don't really handle namespace qualifiers in attribute names.
             return NS_ERROR_NOT_IMPLEMENTED;