Title: [99591] trunk/Source/WebCore
Revision
99591
Author
[email protected]
Date
2011-11-08 10:25:31 -0800 (Tue, 08 Nov 2011)

Log Message

Speculative fix for crashes seen in DocumentWriter::deprecatedFrameEncoding
https://bugs.webkit.org/show_bug.cgi?id=71828

Reviewed by Nate Chapin.

No new tests; not sure how to reproduce this, but crash traces indicate it
is an otherwise-harmless null dereference.

* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::deprecatedFrameEncoding):
Handle null document the same as a document without a URL.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (99590 => 99591)


--- trunk/Source/WebCore/ChangeLog	2011-11-08 18:24:29 UTC (rev 99590)
+++ trunk/Source/WebCore/ChangeLog	2011-11-08 18:25:31 UTC (rev 99591)
@@ -1,3 +1,17 @@
+2011-11-08  Darin Adler  <[email protected]>
+
+        Speculative fix for crashes seen in DocumentWriter::deprecatedFrameEncoding
+        https://bugs.webkit.org/show_bug.cgi?id=71828
+
+        Reviewed by Nate Chapin.
+
+        No new tests; not sure how to reproduce this, but crash traces indicate it
+        is an otherwise-harmless null dereference.
+
+        * loader/DocumentWriter.cpp:
+        (WebCore::DocumentWriter::deprecatedFrameEncoding):
+        Handle null document the same as a document without a URL.
+
 2011-11-08  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r95720.

Modified: trunk/Source/WebCore/loader/DocumentWriter.cpp (99590 => 99591)


--- trunk/Source/WebCore/loader/DocumentWriter.cpp	2011-11-08 18:24:29 UTC (rev 99590)
+++ trunk/Source/WebCore/loader/DocumentWriter.cpp	2011-11-08 18:25:31 UTC (rev 99591)
@@ -244,7 +244,8 @@
 #if PLATFORM(MAC) || PLATFORM(WIN)
 String DocumentWriter::deprecatedFrameEncoding() const
 {
-    if (m_frame->document()->url().isEmpty())
+    Document* document = m_frame->document();
+    if (!document || document->url().isEmpty())
         return m_encoding;
 
     if (m_encodingWasChosenByUser && !m_encoding.isEmpty())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to