2011-03-30 Evan Martin <evan@chromium.org>
authorevan@chromium.org <evan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 12:55:45 +0000 (12:55 +0000)
committerevan@chromium.org <evan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 12:55:45 +0000 (12:55 +0000)
        Reviewed by Ryosuke Niwa.

        Fix a last-second ASSERT in previous change that was wrong.

        * dom/Document.cpp:
        (WebCore::Document::setTitle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82425 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp

index af75bda..c936966 100644 (file)
@@ -1,3 +1,12 @@
+2011-03-30  Evan Martin  <evan@chromium.org>
+
+        Reviewed by Ryosuke Niwa.
+
+        Fix a last-second ASSERT in previous change that was wrong.
+
+        * dom/Document.cpp:
+        (WebCore::Document::setTitle):
+
 2011-03-30  Levi Weintraub  <leviw@chromium.org>
 
         Reviewed by Eric Seidel.
index 71953ef..e3d7f53 100644 (file)
@@ -1351,9 +1351,11 @@ void Document::setTitle(const String& title)
 
     updateTitle(title);
 
-    ASSERT(m_titleElement->hasTagName(titleTag));
-    if (m_titleElement && m_titleElement->hasTagName(titleTag))
-        static_cast<HTMLTitleElement*>(m_titleElement.get())->setText(m_title);
+    if (m_titleElement) {
+        ASSERT(m_titleElement->hasTagName(titleTag));
+        if (m_titleElement->hasTagName(titleTag))
+            static_cast<HTMLTitleElement*>(m_titleElement.get())->setText(m_title);
+    }
 }
 
 void Document::setTitleElement(const String& title, Element* titleElement)