[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.1/kdelibs/khtml/ecma
From:       Maks Orlovich <maksim () kde ! org>
Date:       2008-08-25 2:25:01
Message-ID: 1219631101.217908.15815.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 851964 by orlovich:

Protect the document so we don't crash on parse errors with the DOMParser object.
Fixes #169727 and winterz's bank.
BUG:169727


 M  +2 -2      domparser.cpp  


--- branches/KDE/4.1/kdelibs/khtml/ecma/domparser.cpp #851963:851964
@@ -89,14 +89,14 @@
       QString contentType = args[1]->toString(exec).qstring().trimmed();
 
       if (contentType == "text/xml" || contentType == "application/xml" || \
                contentType == "application/xhtml+xml") {
-        DocumentImpl *docImpl = parser->doc->implementation()->createDocument();
+        SharedPtr<DocumentImpl> docImpl = \
parser->doc->implementation()->createDocument();  
         docImpl->open();
         docImpl->write(str);
         docImpl->finishParsing();
         docImpl->close();
 
-        return getDOMNode(exec, docImpl);
+        return getDOMNode(exec, docImpl.get());
       }
     }
   }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic