<?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>82442</bug_id>
          
          <creation_ts>2012-03-28 02:45:03 -0700</creation_ts>
          <short_desc>Consider removal of removes jsNull()/v8::Null() from JSInternalsCustom.cpp/V8InternalsCustom.cpp</short_desc>
          <delta_ts>2012-03-28 22:47:39 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>
          
          <blocked>82319</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Vineet Chaudhary (vineetc)">code.vineet</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>haraken</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>589783</commentid>
    <comment_count>0</comment_count>
    <who name="Vineet Chaudhary (vineetc)">code.vineet</who>
    <bug_when>2012-03-28 02:45:03 -0700</bug_when>
    <thetext>This has comeup with https://bugs.webkit.org/show_bug.cgi?id=82319#c3
We would like to know if it an expected behaviour for Internals.idl to return null when the vector is empty?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>589802</commentid>
    <comment_count>1</comment_count>
      <attachid>134250</attachid>
    <who name="Vineet Chaudhary (vineetc)">code.vineet</who>
    <bug_when>2012-03-28 03:04:39 -0700</bug_when>
    <thetext>Created attachment 134250
proposed patch

Attacjing proposed patch. This will test if any test case failures.
Please us know if any objections/suggestions. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>589808</commentid>
    <comment_count>2</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-03-28 03:12:10 -0700</bug_when>
    <thetext>eric.carlson: Would you take a look at the change? (See also https://bugs.webkit.org/show_bug.cgi?id=82319) The behavior when the Vector is empty is not spec-ed, and we guess that we can remove the code that returns null when the Vector is empty.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>589809</commentid>
    <comment_count>3</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-03-28 03:13:35 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Attacjing proposed patch. This will test if any test case failures.

If no existing tests are affected, maybe we want to add test cases for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>589836</commentid>
    <comment_count>4</comment_count>
    <who name="Vineet Chaudhary (vineetc)">code.vineet</who>
    <bug_when>2012-03-28 04:17:18 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #1)
&gt; &gt; Attaching proposed patch. This will test if any test case failures.
&gt; 
&gt; If no existing tests are affected, maybe we want to add test cases for this.

Currently there is already a test case http://trac.webkit.org/browser/trunk/LayoutTests/fast/harness/user-preferred-language.html?rev=105315#L20  which checks for empty vector but this wont fail even if we remove 

if (languages.isEmpty())
  return jsNull(); 

Because all the platform have the implementation for platformLanguages().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590081</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2012-03-28 10:14:10 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; eric.carlson: Would you take a look at the change? (See also https://bugs.webkit.org/show_bug.cgi?id=82319) The behavior when the Vector is empty is not spec-ed, and we guess that we can remove the code that returns null when the Vector is empty.

This seems like a reasonable change to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590108</commentid>
    <comment_count>6</comment_count>
    <who name="Vineet Chaudhary (vineetc)">code.vineet</who>
    <bug_when>2012-03-28 10:33:47 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #2)
&gt; &gt; eric.carlson: Would you take a look at the change? (See also https://bugs.webkit.org/show_bug.cgi?id=82319) The behavior when the Vector is empty is not spec-ed, and we guess that we can remove the code that returns null when the Vector is empty.
&gt; 
&gt; This seems like a reasonable change to me.

As per comment #4 the test case covers empty vector case. Do I need to add more coverage for the test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590492</commentid>
    <comment_count>7</comment_count>
      <attachid>134250</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-03-28 15:08:31 -0700</bug_when>
    <thetext>Comment on attachment 134250
proposed patch

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

&gt; Source/WebCore/ChangeLog:9
&gt; +        No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
&gt; +        even after these changes.

OK, it would be hard to add a new test case for this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590859</commentid>
    <comment_count>8</comment_count>
      <attachid>134250</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-28 22:47:34 -0700</bug_when>
    <thetext>Comment on attachment 134250
proposed patch

Clearing flags on attachment: 134250

Committed r112502: &lt;http://trac.webkit.org/changeset/112502&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590860</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-28 22:47:39 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>134250</attachid>
            <date>2012-03-28 03:04:39 -0700</date>
            <delta_ts>2012-03-28 22:47:34 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>intermediate_001.diff</filename>
            <type>text/plain</type>
            <size>2275</size>
            <attacher name="Vineet Chaudhary (vineetc)">code.vineet</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDExMjM3NykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE4IEBACisyMDEyLTAzLTI4ICBWaW5lZXQg
Q2hhdWRoYXJ5ICA8cmdmNzQ4QG1vdG9yb2xhLmNvbT4KKworICAgICAgICBDb25zaWRlciByZW1v
dmFsIG9mIHJlbW92ZXMganNOdWxsKCkvdjg6Ok51bGwoKSBmcm9tIEpTSW50ZXJuYWxzQ3VzdG9t
LmNwcC9WOEludGVybmFsc0N1c3RvbS5jcHAKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5v
cmcvc2hvd19idWcuY2dpP2lkPTgyNDQyCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChP
T1BTISkuCisKKyAgICAgICAgTm8gbmV3IHRlc3RzLiBMYXlvdXRUZXN0cy9mYXN0L2hhcm5lc3Mv
dXNlci1wcmVmZXJyZWQtbGFuZ3VhZ2UuaHRtbCBzaG91bGQgcGFzcworICAgICAgICBldmVuIGFm
dGVyIHRoZXNlIGNoYW5nZXMuCisKKyAgICAgICAgKiB0ZXN0aW5nL2pzL0pTSW50ZXJuYWxzQ3Vz
dG9tLmNwcDogUmVtb3ZlIGpzTnVsbCgpIGlmIFZlY3RvciBpcyBlbXB0eS4KKyAgICAgICAgKFdl
YkNvcmU6OkpTSW50ZXJu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gICAgIHJldHVybiBqc051bGwoKTsKICAgICAKICAgICBN
YXJrZWRBcmd1bWVudEJ1ZmZlciBhcnJheTsKICAgICBWZWN0b3I8U3RyaW5nPjo6Y29uc3RfaXRl
cmF0b3IgZW5kID0gbGFuZ3VhZ2VzLmVuZCgpOwpJbmRleDogU291cmNlL1dlYkNvcmUvdGVzdGlu
Zy92OC9WOEludGVybmFsc0N1c3RvbS5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291cmNlL1dlYkNvcmUv
dGVzdGluZy92OC9WOEludGVybmFsc0N1c3RvbS5jcHAJKHJldmlzaW9uIDExMjI4MCkKKysrIFNv
dXJjZS9XZWJDb3JlL3Rlc3RpbmcvdjgvVjhJbnRlcm5hbHNDdXN0b20uY3BwCSh3b3JraW5nIGNv
cHkpCkBAIC0zNSw4ICszNSw2IEBAIHY4OjpIYW5kbGU8djg6OlZhbHVlPiBWOEludGVybmFsczo6
dXNlclAKIHsKICAgICBJbnRlcm5hbHMqIGludGVybmFscyA9IFY4SW50ZXJuYWxzOjp0b05hdGl2
ZShpbmZvLkhvbGRlcigpKTsKICAgICBjb25zdCBWZWN0b3I8U3RyaW5nPiBsYW5ndWFnZXMgPSBp
bnRlcm5hbHMtPnVzZXJQcmVmZXJyZWRMYW5ndWFnZXMoKTsKLSAgICBpZiAobGFuZ3VhZ2VzLmlz
RW1wdHkoKSkKLSAgICAgICAgcmV0dXJuIHY4OjpOdWxsKCk7CiAKICAgICB2ODo6TG9jYWw8djg6
OkFycmF5PiBhcnJheSA9IHY4OjpBcnJheTo6TmV3KGxhbmd1YWdlcy5zaXplKCkpOwogICAgIFZl
Y3RvcjxTdHJpbmc+Ojpjb25zdF9pdGVyYXRvciBlbmQgPSBsYW5ndWFnZXMuZW5kKCk7Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>