<?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>73502</bug_id>
          
          <creation_ts>2011-11-30 17:00:17 -0800</creation_ts>
          <short_desc>Use const for local variables in KURL::init() and size_t in copyASCII()</short_desc>
          <delta_ts>2011-12-09 12:49:38 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>darin</cc>
    
    <cc>jamesr</cc>
    
    <cc>jarred</cc>
    
    <cc>koivisto</cc>
    
    <cc>pkasting</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>512251</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-11-30 17:00:17 -0800</bug_when>
    <thetext>Use const pointers in KURL::init() and size_t in copyASCII()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512252</commentid>
    <comment_count>1</comment_count>
      <attachid>117300</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-11-30 17:00:36 -0800</bug_when>
    <thetext>Created attachment 117300
Patch v1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512256</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-30 17:04:11 -0800</bug_when>
    <thetext>Attachment 117300 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;Source/WebCore/ChangeLog&apos;, u&apos;Source/WebCor...&quot; exit_code: 1

Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512258</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-11-30 17:05:15 -0800</bug_when>
    <thetext>Why the emphasis on “pointers” here? The const is just a local variable. The fact that it’s a pointer is not all that interesting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513049</commentid>
    <comment_count>4</comment_count>
      <attachid>117300</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2011-12-01 13:30:54 -0800</bug_when>
    <thetext>Comment on attachment 117300
Patch v1

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513051</commentid>
    <comment_count>5</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2011-12-01 13:31:36 -0800</bug_when>
    <thetext>The title could be better as it is not pointers only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>517656</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-12-08 12:10:32 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Why the emphasis on “pointers” here? The const is just a local variable. The fact that it’s a pointer is not all that interesting.

(In reply to comment #5)
&gt; The title could be better as it is not pointers only.

Fixed title.  Will post another patch to incorporate David Levin&apos;s feedback on webkit-dev.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>517866</commentid>
    <comment_count>7</comment_count>
      <attachid>118482</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-12-08 15:56:56 -0800</bug_when>
    <thetext>Created attachment 118482
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>517867</commentid>
    <comment_count>8</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-12-08 15:58:05 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; Created an attachment (id=118482) [details]
&gt; Patch

This addressed the title and ChangeLog wording fixes highlighted by Antti and Darin, and makes baseCharacters a const pointer per email from David Levin on webkit-dev[1].

[1] &lt;message://%3cCACmjMJQzEqCvpODqk--JSmHnX1BEyQDsYMo_=Q1aLddX4crd8A@mail.gmail.com%3e&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>517886</commentid>
    <comment_count>9</comment_count>
      <attachid>118482</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-12-08 16:18:19 -0800</bug_when>
    <thetext>Comment on attachment 118482
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118482&amp;action=review

&gt; Source/WebCore/platform/KURL.cpp:262
&gt; -static void copyASCII(const UChar* src, int length, char* dest)
&gt; +static void copyASCII(const UChar* src, const size_t length, char* dest)
&gt;  {
&gt; -    for (int i = 0; i &lt; length; i++)
&gt; +    for (size_t i = 0; i &lt; length; i++)
&gt;          dest[i] = static_cast&lt;char&gt;(src[i]);
&gt;  }

Why on earth would we use const here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518074</commentid>
    <comment_count>10</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-12-08 20:34:32 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; (From update of attachment 118482 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=118482&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/KURL.cpp:262
&gt; &gt; -static void copyASCII(const UChar* src, int length, char* dest)
&gt; &gt; +static void copyASCII(const UChar* src, const size_t length, char* dest)
&gt; &gt;  {
&gt; &gt; -    for (int i = 0; i &lt; length; i++)
&gt; &gt; +    for (size_t i = 0; i &lt; length; i++)
&gt; &gt;          dest[i] = static_cast&lt;char&gt;(src[i]);
&gt; &gt;  }
&gt; 
&gt; Why on earth would we use const here?

Because the length parameter should never change within the method.

Is there a technical reason that it shouldn&apos;t be used, or is this more of a style/personal preference issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518334</commentid>
    <comment_count>11</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-12-09 10:33:51 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; (From update of attachment 118482 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=118482&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebCore/platform/KURL.cpp:262
&gt; &gt; &gt; -static void copyASCII(const UChar* src, int length, char* dest)
&gt; &gt; &gt; +static void copyASCII(const UChar* src, const size_t length, char* dest)
&gt; &gt; &gt;  {
&gt; &gt; &gt; -    for (int i = 0; i &lt; length; i++)
&gt; &gt; &gt; +    for (size_t i = 0; i &lt; length; i++)
&gt; &gt; &gt;          dest[i] = static_cast&lt;char&gt;(src[i]);
&gt; &gt; &gt;  }
&gt; &gt; 
&gt; &gt; Why on earth would we use const here?
&gt; 
&gt; Because the length parameter should never change within the method.
&gt; 
&gt; Is there a technical reason that it shouldn&apos;t be used, or is this more of a style/personal preference issue?

It is a style issue.

Almost all arguments of almost all functions are not changed within the function. For example, this function could be written like this:

    static void copyASCII(const UChar* const src, const size_t length, char* const dest)

This would indicate that src, length, and dest are all unchanged in the implementation of the function. I think that is harder to read than the existing function. And I am not sure why length stands out from the other arguments as worthwhile to call out as unchanged. Does that help people reading the code? It seems unnecessarily cluttered to include const all the time. If const was the default, then I would agree that we should leave all arguments and local variables const except for the ones we plan to modify, but since it’s not the default I prefer that we not put const everywhere.

Stating const when there is something unclear and interesting to be clarified or emphasized is a different story. We’ve been discussing cases like that, for example I think you and Antti have been highlighting a case where there is a local variable in a large complex function and it might be useful to emphasize the point that it is never changed.

For a two line function, declaring the arguments const seems not to clarify sufficiently to be worth the clutter.

I’d like some sort of rule, even if a subjective one, about when we use it. It doesn’t have to be a firm machine-enforceable rule, but I do want consistency and not decisions made differently based on different programmers’ whims. I find it easier to work on WebKit because we use on a consistent basic coding style and adhere to it most of the time.

The rule I suggested until now was “don’t use const for the values of arguments or of local variables” -- we’d still use const for members and of for the types the references refer to and pointers point to -- but I believe you wrote this bug at least in part because you are dissatisfied with that rule. So I’d like to make sure we have a new one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518413</commentid>
    <comment_count>12</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-12-09 12:46:19 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; Is there a technical reason that it shouldn&apos;t be used, or is this more of a style/personal preference issue?
&gt; 
&gt; It is a style issue.
&gt; 
&gt; Almost all arguments of almost all functions are not changed within the function. For example, this function could be written like this:
&gt; 
&gt;     static void copyASCII(const UChar* const src, const size_t length, char* const dest)

Ahh!  I agree that would detract the readability of the code.

&gt; I’d like some sort of rule, even if a subjective one, about when we use it. It doesn’t have to be a firm machine-enforceable rule, but I do want consistency and not decisions made differently based on different programmers’ whims. I find it easier to work on WebKit because we use on a consistent basic coding style and adhere to it most of the time.
&gt; 
&gt; The rule I suggested until now was “don’t use const for the values of arguments or of local variables” -- we’d still use const for members and of for the types the references refer to and pointers point to -- but I believe you wrote this bug at least in part because you are dissatisfied with that rule. So I’d like to make sure we have a new one.

Another way to look at this is that if KURL::init() were split up into smaller functions/methods, the need for making local variables const would greatly decrease since one could read the entire block of code to see how all of the variables are used (and thus which ones should not be changed because they&apos;re used for calculating lengths).

Or to put it yet another way, my desire to add const to local variables is a really a code smell that probably means the method is too large to easily understand/read.

However, refactoring KURL::init() is not at the top of my priority list, so I&apos;m just going to close this bug as RESOLVED/WONTFIX.

Thanks for the explanation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518414</commentid>
    <comment_count>13</comment_count>
      <attachid>118482</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-12-09 12:46:37 -0800</bug_when>
    <thetext>Comment on attachment 118482
Patch

Clearing flags and marking obsolete.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518419</commentid>
    <comment_count>14</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-12-09 12:49:38 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; (From update of attachment 118482 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=118482&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebCore/platform/KURL.cpp:262
&gt; &gt; &gt; -static void copyASCII(const UChar* src, int length, char* dest)
&gt; &gt; &gt; +static void copyASCII(const UChar* src, const size_t length, char* dest)
&gt; &gt; &gt;  {
&gt; &gt; &gt; -    for (int i = 0; i &lt; length; i++)
&gt; &gt; &gt; +    for (size_t i = 0; i &lt; length; i++)
&gt; &gt; &gt;          dest[i] = static_cast&lt;char&gt;(src[i]);
&gt; &gt; &gt;  }
&gt; &gt; 
&gt; &gt; Why on earth would we use const here?
&gt; 
&gt; Because the length parameter should never change within the method.
&gt; 
&gt; Is there a technical reason that it shouldn&apos;t be used, or is this more of a style/personal preference issue?

This is a clear cut case where the constness of a variable is self-evident (the function is only 2 lines!), and there&apos;s almost no benefit in explicitly marking it as const.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>117300</attachid>
            <date>2011-11-30 17:00:36 -0800</date>
            <delta_ts>2011-12-08 15:56:51 -0800</delta_ts>
            <desc>Patch v1</desc>
            <filename>bug-73502-20111130170035.patch</filename>
            <type>text/plain</type>
            <size>3147</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTAxNDQ1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNGVhYzFiZjMyZTIzN2Vm
MDM0ZTVhYWJjYTNmM2ZhZTg2MDAyZjYxNi4uZGQyMDc5NzVmZjk5NzcwNjJlMjBkMGI3ZmVhN2Jh
NGY3N2I3MWYwMSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDExLTExLTMwICBEYXZp
ZCBLaWx6ZXIgIDxkZGtpbHplckBhcHBsZS5jb20+CisKKyAgICAgICAgVXNlIGNvbnN0IHBvaW50
ZXJzIGluIEtVUkw6OmluaXQoKSBhbmQgc2l6ZV90IGluIGNvcHlBU0NJSSgpCisgICAgICAgIDxo
dHRwOi8vd2Via2l0Lm9yZy9iLzAwMDAwPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAo
T09QUyEpLgorCisgICAgICAgICogcGxhdGZvcm0vS1VSTC5jcHA6CisgICAgICAgIChXZWJDb3Jl
Ojpjb3B5QVNDSUkpOiBTd2l0Y2ggZnJvbSBpbnQgdG8gc2l6ZV90IHNpbmNlIHdlJ3JlCisgICAg
ICAgIHdvcmtpbmcgd2l0aCBwb2ludGVyIGluZGljZXMuCisgICAgICAgIChXZWJDb3JlOjpLVVJM
Ojppbml0KTogTWFrZSBwb2ludGVycyBjb25zdCB0aGF0IGFyZSBub3QgaW50ZW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ICAgICAgICAgICAgY29uc3QgY2hhciogYmFzZVN0cmluZ0VuZCA9IGJhc2VTdHJpbmcgKyBiYXNl
Lm1fcGF0aEVuZDsK
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>118482</attachid>
            <date>2011-12-08 15:56:56 -0800</date>
            <delta_ts>2011-12-09 12:46:37 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-73502-20111208155654.patch</filename>
            <type>text/plain</type>
            <size>3222</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTAxNDQ1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNGVhYzFiZjMyZTIzN2Vm
MDM0ZTVhYWJjYTNmM2ZhZTg2MDAyZjYxNi4uYWEyNTVlYTNjNGZjMjc4NzQwZDkzODgzNTM0OTEz
NjRhYjA2OGNhZiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDExLTEyLTA4ICBEYXZp
ZCBLaWx6ZXIgIDxkZGtpbHplckBhcHBsZS5jb20+CisKKyAgICAgICAgVXNlIGNvbnN0IGZvciBs
b2NhbCB2YXJpYWJsZXMgaW4gS1VSTDo6aW5pdCgpIGFuZCBzaXplX3QgaW4gY29weUFTQ0lJKCkK
KyAgICAgICAgPGh0dHA6Ly93ZWJraXQub3JnL2IvNzM1MDI+CisKKyAgICAgICAgUmV2aWV3ZWQg
YnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgKiBwbGF0Zm9ybS9LVVJMLmNwcDoKKyAgICAg
ICAgKFdlYkNvcmU6OmNvcHlBU0NJSSk6IFN3aX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ICAgICAgICAgICAgKmJ1ZmZl
clBvcysrID0gKmJhc2VTdHJpbmdTdGFydCsrOwotICAgICAgICAgICAgICAgIGNoYXIqIGJ1ZmZl
clBhdGhTdGFydCA9IGJ1ZmZlclBvczsKKyAgICAgICAgICAgICAgICBjaGFyKiBjb25zdCBidWZm
ZXJQYXRoU3RhcnQgPSBidWZmZXJQb3M7CiAKICAgICAgICAgICAgICAgICAvLyBub3cgY29weSB0
aGUgYmFzZSBwYXRoCiAgICAgICAgICAgICAgICAgY29uc3QgY2hhciogYmFzZVN0cmluZ0VuZCA9
IGJhc2VTdHJpbmcgKyBiYXNlLm1fcGF0aEVuZDsK
</data>

          </attachment>
      

    </bug>

</bugzilla>