Title: [253096] trunk/Source/WebCore
Revision
253096
Author
[email protected]
Date
2019-12-04 00:07:10 -0800 (Wed, 04 Dec 2019)

Log Message

Nullptr crash in Node::setTextContent via Document::setTitle if title element is removed before setTextContent call.
https://bugs.webkit.org/show_bug.cgi?id=204332

Added periods at the end of each comment added in r252667 as Simon pointed out.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (253095 => 253096)


--- trunk/Source/WebCore/ChangeLog	2019-12-04 08:02:03 UTC (rev 253095)
+++ trunk/Source/WebCore/ChangeLog	2019-12-04 08:07:10 UTC (rev 253096)
@@ -1,3 +1,13 @@
+2019-12-03  Ryosuke Niwa  <[email protected]>
+
+        Nullptr crash in Node::setTextContent via Document::setTitle if title element is removed before setTextContent call.
+        https://bugs.webkit.org/show_bug.cgi?id=204332
+
+        Added periods at the end of each comment added in r252667 as Simon pointed out.
+
+        * dom/Document.cpp:
+        (WebCore::Document::setTitle):
+
 2019-12-04  Tim Horton  <[email protected]>
 
         Fix the build

Modified: trunk/Source/WebCore/dom/Document.cpp (253095 => 253096)


--- trunk/Source/WebCore/dom/Document.cpp	2019-12-04 08:02:03 UTC (rev 253095)
+++ trunk/Source/WebCore/dom/Document.cpp	2019-12-04 08:07:10 UTC (rev 253096)
@@ -1611,7 +1611,7 @@
             m_titleElement = SVGTitleElement::create(SVGNames::titleTag, *this);
             element->insertBefore(*m_titleElement, element->firstChild());
         }
-        // insertBefore above may have ran scripts which removed m_titleElement
+        // insertBefore above may have ran scripts which removed m_titleElement.
         if (m_titleElement)
             m_titleElement->setTextContent(title);
     } else if (is<HTMLElement>(element)) {
@@ -1622,7 +1622,7 @@
             m_titleElement = HTMLTitleElement::create(HTMLNames::titleTag, *this);
             headElement->appendChild(*m_titleElement);
         }
-        // appendChild above may have ran scripts which removed m_titleElement
+        // appendChild above may have ran scripts which removed m_titleElement.
         if (m_titleElement)
             m_titleElement->setTextContent(title);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to