<?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>101212</bug_id>
          
          <creation_ts>2012-11-05 06:21:34 -0800</creation_ts>
          <short_desc>[V8] IDBKey::toV8(impl) should return null instead of undefined when impl is 0</short_desc>
          <delta_ts>2012-11-05 14:14:19 -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>WebCore JavaScript</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>101054</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kentaro Hara">haraken</reporter>
          <assigned_to name="Kentaro Hara">haraken</assigned_to>
          <cc>abarth</cc>
    
    <cc>alecflett</cc>
    
    <cc>japhet</cc>
    
    <cc>jsbell</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>758476</commentid>
    <comment_count>0</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 06:21:34 -0800</bug_when>
    <thetext>All other toV8(impl) return null when impl is 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758480</commentid>
    <comment_count>1</comment_count>
      <attachid>172326</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 06:26:06 -0800</bug_when>
    <thetext>Created attachment 172326
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758482</commentid>
    <comment_count>2</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 06:26:47 -0800</bug_when>
    <thetext>jsbell, alecflett: would you check if this patch doesn&apos;t break compatibility?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758524</commentid>
    <comment_count>3</comment_count>
      <attachid>172326</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-05 07:41:52 -0800</bug_when>
    <thetext>Comment on attachment 172326
Patch

Please wait to hear from jsbell or alecflett before landing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758531</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2012-11-05 07:51:14 -0800</bug_when>
    <thetext>Returning undefined in that case is intentional, see:

https://bugs.webkit.org/show_bug.cgi?id=96401

...which contains the spec reference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758533</commentid>
    <comment_count>5</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 07:53:17 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Returning undefined in that case is intentional, see:
&gt; 
&gt; https://bugs.webkit.org/show_bug.cgi?id=96401
&gt; 
&gt; ...which contains the spec reference.

ok, then I&apos;ll add a comment about it.

(The spec sounds strange to me though.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758540</commentid>
    <comment_count>6</comment_count>
      <attachid>172336</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 08:04:19 -0800</bug_when>
    <thetext>Created attachment 172336
patch for landing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758557</commentid>
    <comment_count>7</comment_count>
      <attachid>172336</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-05 08:29:45 -0800</bug_when>
    <thetext>Comment on attachment 172336
patch for landing

This probably isn&apos;t the best way to implement this requirement.  Instead, the attributes that can return undefined should do so explicitly rather than relying upon toJS/toV8 to do something wonky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758560</commentid>
    <comment_count>8</comment_count>
      <attachid>172336</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 08:31:40 -0800</bug_when>
    <thetext>Comment on attachment 172336
patch for landing

Makes sense. Will fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758563</commentid>
    <comment_count>9</comment_count>
      <attachid>172336</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-11-05 08:32:34 -0800</bug_when>
    <thetext>Comment on attachment 172336
patch for landing

Clearing flags on attachment: 172336

Committed r133483: &lt;http://trac.webkit.org/changeset/133483&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758564</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-11-05 08:32:38 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758631</commentid>
    <comment_count>11</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 10:01:10 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (From update of attachment 172336 [details])
&gt; This probably isn&apos;t the best way to implement this requirement.  Instead, the attributes that can return undefined should do so explicitly rather than relying upon toJS/toV8 to do something wonky.

At first I was thinking about introducing a new IDL attribute [TreatReturnedNullAs=Undefined]. However, as far as I scanned custom bindings, DOM attributes benefited by the IDL attribute are only IDBKeyRange.upper and IDBKeyRange.lower. Maybe it would make sense to just write custom getters for IDBKeyRange.upper and IDBKeyRange.lower?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758642</commentid>
    <comment_count>12</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-05 10:09:24 -0800</bug_when>
    <thetext>&gt; At first I was thinking about introducing a new IDL attribute [TreatReturnedNullAs=Undefined]. However, as far as I scanned custom bindings, DOM attributes benefited by the IDL attribute are only IDBKeyRange.upper and IDBKeyRange.lower. Maybe it would make sense to just write custom getters for IDBKeyRange.upper and IDBKeyRange.lower?

We should look in WebIDL, but I think technically the right way to handle this is by adding a ? after the type in the IDL file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758647</commentid>
    <comment_count>13</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 10:13:05 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; We should look in WebIDL, but I think technically the right way to handle this is by adding a ? after the type in the IDL file.

The situation looks a bit different. &apos;IDBKey?&apos; means that an IDBKey object and null are valid values. (http://dev.w3.org/2006/webapi/WebIDL/#idl-nullable-type) On the other hand, in our situation we want to return undefined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758650</commentid>
    <comment_count>14</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-05 10:15:41 -0800</bug_when>
    <thetext>Does that mean the behavior of this interface cannot be represented in WebIDL?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758661</commentid>
    <comment_count>15</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 10:22:11 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; Does that mean the behavior of this interface cannot be represented in WebIDL?

In my understanding, we cannot. (If upper and lower are speced to return null, it is conformed to the WebIDL. In that sense, the spec sounds strange to me.)

It is possible to represent the behavior in the WebKit IDL by introducing [TreatReturnedNullAs=Undefined], but the IDL attribute just benefits only IDBKeyRange.upper and IDBKeyRannge.lower. (Also, if we try to support [TreatReturnedNullAs=*] for all types, it would mess up JSValueToNative() in CodeGenerator*.pm.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758665</commentid>
    <comment_count>16</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-05 10:25:54 -0800</bug_when>
    <thetext>For the time being, I&apos;d recommend going with custom code.

I don&apos;t fully understand why these attributes return undefined.  Is there a strong reason for that from the IDB side?  If not, we might want to change the spec to better align with the rest of the platform.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758667</commentid>
    <comment_count>17</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-11-05 10:27:20 -0800</bug_when>
    <thetext>(In reply to comment #16)
&gt; I don&apos;t fully understand why these attributes return undefined.  Is there a strong reason for that from the IDB side?  If not, we might want to change the spec to better align with the rest of the platform.

Agreed.

jsbell, alecflett: Do you have any idea?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758699</commentid>
    <comment_count>18</comment_count>
    <who name="Alec Flett">alecflett</who>
    <bug_when>2012-11-05 10:56:34 -0800</bug_when>
    <thetext>That sounds totally reasonable to me, but I don&apos;t know enough of the background - I defer to jsbell@ here but I expect we&apos;ll take it up on the list..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758766</commentid>
    <comment_count>19</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2012-11-05 11:56:49 -0800</bug_when>
    <thetext>I don&apos;t think there&apos;s any particular reason to prefer null vs. undefined for these attributes in the spec. Neither are &quot;valid&quot; values for a key.

As alecflett@ says, this will come down to list consensus. 

As far as implementing it, I have webkit.org/b/97375 filed to propose removing all of the custom binding logic around IDBKey, since IDBKey is a WebKit concept not an IDB concept. I was thinking use any/ScriptValue (IDL/C++) and do IDBKey&lt;-&gt;ScriptValue conversion in the IDB code itself by calls into the binding utilities. Not sure that&apos;s the right direction to go, but it would remove these special cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758768</commentid>
    <comment_count>20</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2012-11-05 11:59:14 -0800</bug_when>
    <thetext>(In reply to comment #13)

&gt; The situation looks a bit different. &apos;IDBKey?&apos; means that an IDBKey object and null are valid values. (http://dev.w3.org/2006/webapi/WebIDL/#idl-nullable-type) On the other hand, in our situation we want to return undefined.

And just to re-iterate - the IDB spec doesn&apos;t define an IDBKey interface in the IDL; that&apos;s entirely a WebKit creation. Wherever WebKitIDLs use IDBKey it is |any| in the IDB spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758869</commentid>
    <comment_count>21</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-05 14:03:55 -0800</bug_when>
    <thetext>&gt; And just to re-iterate - the IDB spec doesn&apos;t define an IDBKey interface in the IDL; that&apos;s entirely a WebKit creation. Wherever WebKitIDLs use IDBKey it is |any| in the IDB spec.

Is there a particular reason IDB wants to return undefined here rather than null?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758878</commentid>
    <comment_count>22</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2012-11-05 14:07:39 -0800</bug_when>
    <thetext>(In reply to comment #21)
&gt; 
&gt; Is there a particular reason IDB wants to return undefined here rather than null?

No, I don&apos;t think so. (I think the IDB spec in general went a little crazy with &quot;undefined&quot;; I seem to recall this was done across the spec at some point about a year ago but I don&apos;t recall the rationale or history.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758889</commentid>
    <comment_count>23</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-05 14:14:19 -0800</bug_when>
    <thetext>It might be better if we changed to spec to make these attributes behave like most other attributes in the platform.  I don&apos;t know how locked down the current spec is, however.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>172326</attachid>
            <date>2012-11-05 06:26:06 -0800</date>
            <delta_ts>2012-11-05 08:04:14 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-101212-20121105152420.patch</filename>
            <type>text/plain</type>
            <size>7063</size>
            <attacher name="Kentaro Hara">haraken</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTMzNDMzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaG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5OWYwNmM2NSAxMDA2NDQKLS0tIGEvTGF5b3V0VGVz
dHMvc3RvcmFnZS9pbmRleGVkZGIvcmVzb3VyY2VzL2tleXJhbmdlLmpzCisrKyBiL0xheW91dFRl
c3RzL3N0b3JhZ2UvaW5kZXhlZGRiL3Jlc291cmNlcy9rZXlyYW5nZS5qcwpAQCAtMjEsNyArMjEs
NyBAQCBmdW5jdGlvbiBjaGVja0xvd2VyQm91bmRLZXlSYW5nZSh2YWx1ZSwgb3BlbikKICAgICBp
ZiAob3BlbiA9PT0gdW5kZWZpbmVkKQogICAgICAgICBvcGVuID0gZmFsc2U7CiAgICAgc2hvdWxk
QmUoImtleVJhbmdlLmxvd2VyT3BlbiIsICIiICsgb3Blbik7Ci0gICAgc2hvdWxkQmVVbmRlZmlu
ZWQoImtleVJhbmdlLnVwcGVyIik7CisgICAgc2hvdWxkQmVOdWxsKCJrZXlSYW5nZS51cHBlciIp
OwogICAgIHNob3VsZEJlVHJ1ZSgia2V5UmFuZ2UudXBwZXJPcGVuIik7CiB9CiAKQEAgLTMyLDcg
KzMyLDcgQEAgZnVuY3Rpb24gY2hlY2tVcHBlckJvdW5kS2V5UmFuZ2UodmFsdWUsIG9wZW4pCiAg
ICAgaWYgKG9wZW4gPT09IHVuZGVmaW5lZCkKICAgICAgICAgb3BlbiA9IGZhbHNlOwogICAgIHNo
b3VsZEJlKCJrZXlSYW5nZS51cHBlck9wZW4iLCAiIiArIG9wZW4pOwotICAgIHNob3VsZEJlVW5k
ZWZpbmVkKCJrZXlSYW5nZS5sb3dlciIpOworICAgIHNob3VsZEJlTnVsbCgia2V5UmFuZ2UubG93
ZXIiKTsKICAgICBzaG91bGRCZVRydWUoImtleVJhbmdlLmxvd2VyT3BlbiIpOwogfQogCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>172336</attachid>
            <date>2012-11-05 08:04:19 -0800</date>
            <delta_ts>2012-11-05 08:32:34 -0800</delta_ts>
            <desc>patch for landing</desc>
            <filename>bug-101212-20121105170233.patch</filename>
            <type>text/plain</type>
            <size>2475</size>
            <attacher name="Kentaro Hara">haraken</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTMzNDMzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMThiOTEyNGVkZDU1ZTBk
NGE0MGI4ZGJhZWE1YjE4MDFhMDc3MzMxMy4uZjc1M2UwODNjNGIyNDg0YjhlNzM1MTk2YTE0YzA5
ZmFkYmNlM2Y0MCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSw1ICsxLDIzIEBACiAyMDEyLTExLTA1ICBLZW50
YXJvIEhhcmEgIDxoYXJha2VuQGNocm9taXVtLm9yZz4KIAorICAgICAgICBBZGQgYSBjb21tZW50
IGFib3V0IGEgcmV0dXJuIHZhbHVlIG9mIElEQktleTo6dG9WOCgpCisgICAgICAgIGh0dHBzOi8v
YnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMDEyMTIKKworICAgICAgICBSZXZpZXdl
ZCBieSBBZGFtIEJhcnRoLgorCisgICAgICAgIEFsdGhvdWdoIGFsbCBvdGhlciB0b1Y4KGltcGwp
IHJldHVybiBudWxsIHdoZW4gaW1wbCBpcyAwLAorICAgICAgICBJREJLZXk6OnRvVjgoaW1wbCkg
aXMgZXhwZWN0ZWQgdG8gcmV0dXJuIHVuZGVmaW5lZCB3aGVuIGltcGwgaXMgMC4KKyAgICAgICAg
VGhpcyBwYXRjaCBhZGRzIGEgY29tbWVudCBhYm91dCBpdC4KKworICAgICAgICBObyB0ZXN0cy4K
KworICAgICAgICAqIGJpbmRpbmdzL2pzL0pTSURCS2V5Q3VzdG9tLmNwc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