Fix NULL de-refernce in HTMLAnchorElement::sendPings when settings doesn't exist
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2013 05:48:32 +0000 (05:48 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2013 05:48:32 +0000 (05:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=119716

Reviewed by Darin Adler.

Merge https://chromium.googlesource.com/chromium/blink/+/d5783da353ab783e9994b8fbecd91880be5192a1

No new tests since the test in the Blink change doesn't reproduce crash on WebKit.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::sendPings):

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

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAnchorElement.cpp

index 72d0b7bf9fdf8aa42f9114a500afe3aff59c210d..ea3d492c8b34fe967b3a001e0dd6b231f5a78821 100644 (file)
@@ -1,3 +1,17 @@
+2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Fix NULL de-refernce in HTMLAnchorElement::sendPings when settings doesn't exist
+        https://bugs.webkit.org/show_bug.cgi?id=119716
+
+        Reviewed by Darin Adler.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/d5783da353ab783e9994b8fbecd91880be5192a1
+
+        No new tests since the test in the Blink change doesn't reproduce crash on WebKit.
+
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::sendPings):
+
 2013-08-12  Seokju Kwon  <seokju@webkit.org>
 
         Use the correct preprocessor in shouldRepaintFixedBackgroundsOnScroll()
index 977c7ab70c0c4713df4c48f58dc33c2e3233bbd6..741f32c1ad33744e5a4fffdbd05971a294714ab7 100644 (file)
@@ -512,7 +512,7 @@ bool HTMLAnchorElement::isLiveLink() const
 
 void HTMLAnchorElement::sendPings(const KURL& destinationURL)
 {
-    if (!hasAttribute(pingAttr) || !document()->settings()->hyperlinkAuditingEnabled())
+    if (!hasAttribute(pingAttr) || !document()->settings() || !document()->settings()->hyperlinkAuditingEnabled())
         return;
 
     SpaceSplitString pingURLs(getAttribute(pingAttr), false);