<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>29908</bug_id>
          
          <creation_ts>2009-09-29 17:33:16 -0700</creation_ts>
          <short_desc>Make assertion clearer for case where UTF8 is not supported by platform TextCodec</short_desc>
          <delta_ts>2009-09-29 18:08:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Text</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yong Li">yong.li.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darin</cc>
    
    <cc>staikos</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>151115</commentid>
    <comment_count>0</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2009-09-29 17:33:16 -0700</bug_when>
    <thetext>UTF8Encoding() returns a static TextEncoding object. But if &quot;UTF-8&quot; is not registered by platform TextCodec, the encoding object will contain a null &quot;m_name&quot; and newTextCodec() will get a null &quot;factory&quot; function.

There&apos;s already an ASSERT(factory.function) in newTextCodec(), but at that point, the encoding name is null. It&apos;s not so clear that the crash is due to missing UTF-8 support. ASSERT(factory.function) is supposed to detect the problem that the platform TextCodec forgets to register a factory for an encoding it has registered.

So we think adding an ASSERT to UTF8Encoding() can be helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>151118</commentid>
    <comment_count>1</comment_count>
      <attachid>40337</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2009-09-29 17:39:43 -0700</bug_when>
    <thetext>Created attachment 40337
the patch

the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>151119</commentid>
    <comment_count>2</comment_count>
      <attachid>40337</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-09-29 17:40:55 -0700</bug_when>
    <thetext>Comment on attachment 40337
the patch

Seems fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>151130</commentid>
    <comment_count>3</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2009-09-29 18:08:34 -0700</bug_when>
    <thetext>
Landed @48913</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>40337</attachid>
            <date>2009-09-29 17:39:43 -0700</date>
            <delta_ts>2009-09-29 18:08:11 -0700</delta_ts>
            <desc>the patch</desc>
            <filename>29908.patch</filename>
            <type>text/plain</type>
            <size>964</size>
            <attacher name="Yong Li">yong.li.webkit</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
NzJkNmY2Yy4uMDVjOTYyMyAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxMyBAQAorMjAwOS0wOS0yOSAgWW9uZyBMaSAgPHlv
bmcubGlAdG9yY2htb2JpbGUuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09Q
UyEpLgorCisgICAgICAgIEFkZCBhbiBBU1NFUlQgZm9yIFVURjhFbmNvZGluZygpLmlzVmFsaWQo
KQorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9Mjk5MDgK
KworICAgICAgICAqIHBsYXRmb3JtL3RleHQvVGV4dEVuY29kaW5nLmNwcDoKKyAgICAgICAgKFdl
YkNvcmU6OlVURjhFbmNvZGluZyk6CisKIDIwMDktMDktMjkgIEVucmljYSBDYXN1Y2NpICA8ZW5y
aWNhQGFwcGxlLmNvbT4KIAogICAgICAgICBSZXZpZXdlZCBieSBBZGVsZSBQZXRlcnNvbi4KZGlm
ZiAtLWdpdCBhL1dlYkNvcmUvcGxhdGZvcm0vdGV4dC9UZXh0RW5jb2RpbmcuY3BwIGIvV2ViQ29y
ZS9wbGF0Zm9ybS90ZXh0L1RleHRFbmNvZGluZy5jcHAKaW5kZXggYjc2ZjczOS4uYzVjOGNmZCAx
MDA2NDQKLS0tIGEvV2ViQ29yZS9wbGF0Zm9ybS90ZXh0L1RleHRFbmNvZGluZy5jcHAKKysrIGIv
V2ViQ29yZS9wbGF0Zm9ybS90ZXh0L1RleHRFbmNvZGluZy5jcHAKQEAgLTI2NCw2ICsyNjQsNyBA
QCBjb25zdCBUZXh0RW5jb2RpbmcmIFVURjMyTGl0dGxlRW5kaWFuRW5jb2RpbmcoKQogY29uc3Qg
VGV4dEVuY29kaW5nJiBVVEY4RW5jb2RpbmcoKQogewogICAgIHN0YXRpYyBUZXh0RW5jb2Rpbmcg
Z2xvYmFsVVRGOEVuY29kaW5nKCJVVEYtOCIpOworICAgIEFTU0VSVChnbG9iYWxVVEY4RW5jb2Rp
bmcuaXNWYWxpZCgpKTsKICAgICByZXR1cm4gZ2xvYmFsVVRGOEVuY29kaW5nOwogfQogCg==
</data>
<flag name="review"
          id="21551"
          type_id="1"
          status="+"
          setter="darin"
    />
    <flag name="commit-queue"
          id="21552"
          type_id="3"
          status="-"
          setter="yong.li.webkit"
    />
          </attachment>
      

    </bug>

</bugzilla>