2009-03-26 Jungshik Shin <jshin@chromium.org>
authorcwzwarich@webkit.org <cwzwarich@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2009 02:51:43 +0000 (02:51 +0000)
committercwzwarich@webkit.org <cwzwarich@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2009 02:51:43 +0000 (02:51 +0000)
        Reviewed by Cameron Zwarich.

        1. Fix the crash in setHintEncoding
        2. Fix build failures on Tiger and Qt.
        UnusedParam.h was not included by TextEncodingDetector{None,ICU}.cpp
        in the patch landed in r42023
        for http://bugs.webkit.org/show_bug.cgi?id=16482

        * loader/TextResourceDecoder.h:
        (WebCore::TextResourceDecoder::setHintEncoding):
        * platform/text/TextEncodingDetectorICU.cpp:
        * platform/text/TextEncodingDetectorNone.cpp:

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

WebCore/ChangeLog
WebCore/loader/TextResourceDecoder.h
WebCore/platform/text/TextEncodingDetectorICU.cpp
WebCore/platform/text/TextEncodingDetectorNone.cpp

index eb0d3be..164a9fd 100644 (file)
@@ -1,3 +1,18 @@
+2009-03-26  Jungshik Shin  <jshin@chromium.org>
+
+        Reviewed by Cameron Zwarich.
+
+        1. Fix the crash in setHintEncoding
+        2. Fix build failures on Tiger and Qt.
+        UnusedParam.h was not included by TextEncodingDetector{None,ICU}.cpp
+        in the patch landed in r42023
+        for http://bugs.webkit.org/show_bug.cgi?id=16482
+
+        * loader/TextResourceDecoder.h:
+        (WebCore::TextResourceDecoder::setHintEncoding):
+        * platform/text/TextEncodingDetectorICU.cpp:
+        * platform/text/TextEncodingDetectorNone.cpp:
+
 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
 
         Build fix when ACCELERATED_COMPOSITING is turned on.
index 368741f..fb755c9 100644 (file)
@@ -55,8 +55,8 @@ public:
     void setHintEncoding(const TextResourceDecoder* hintDecoder)
     {
         // hintEncoding is for use with autodetection, which should be 
-        // only invoked  when hintEncoding comes from auto-detection.
-        if (hintDecoder->m_source == AutoDetectedEncoding)
+        // only invoked when hintEncoding comes from auto-detection.
+        if (hintDecoder && hintDecoder->m_source == AutoDetectedEncoding)
             m_hintEncoding = hintDecoder->encoding().name();
     }
    
index 74c38fb..26c997e 100644 (file)
@@ -32,6 +32,8 @@
 #include "TextEncodingDetector.h"
 
 #include "TextEncoding.h"
+#include "UnusedParam.h"
+
 #ifndef BUILDING_ON_TIGER
 #include "unicode/ucnv.h"
 #include "unicode/ucsdet.h"
index a28c5fd..2655f08 100644 (file)
@@ -32,6 +32,7 @@
 #include "TextEncodingDetector.h"
 
 #include "TextEncoding.h"
+#include "UnusedParam.h"
 
 namespace WebCore {