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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16832</bug_id>
          
          <creation_ts>2012-04-24 07:56:31 +0000</creation_ts>
          <short_desc>Don&apos;t get the length property off platform objects with indexed properties</short_desc>
          <delta_ts>2012-06-20 05:36:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebIDL</component>
          <version>unspecified</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="Ms2ger">Ms2ger</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66959</commentid>
    <comment_count>0</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-04-24 07:56:31 +0000</bug_when>
    <thetext>See discussion starting at &lt;http://krijnhoetmer.nl/irc-logs/developers/20120424#l-1470&gt;. In particular, those objects need not have a length property</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66961</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-04-24 08:24:06 +0000</bug_when>
    <thetext>http://krijnhoetmer.nl/irc-logs/whatwg/20120424#l-372</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69271</commentid>
    <comment_count>2</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-06-20 04:20:08 +0000</bug_when>
    <thetext>OK, so two things to fix here:

1. We shouldn&apos;t look up a &quot;length&quot; property on a platform object that has
   indexed properties when we want to know how many there are, since that property
   from the prototype could be changed.  Instead, we should just know internally
   how many indexed properties there are.

2. We should always expose a &quot;length&quot; property on objects that have indexed
   properties, and not have to define an IDL attribute for it.  If we do this,
   then we should require indexed properties not to be sparse (which I think
   they currently can be).

Boris mentioned that it might be better to have &quot;length&quot; exposed as a data property rather than an accessor property (and if we do that, then it&apos;ll need to be on the object itself rather than on the prototype).  Is anyone opposed to doing that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69272</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-06-20 04:30:19 +0000</bug_when>
    <thetext>I&apos;m no longer entirely sure it&apos;s a good idea, for what it&apos;s worth...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69275</commentid>
    <comment_count>4</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-06-20 05:18:18 +0000</bug_when>
    <thetext>One disadvantage to having &quot;length&quot; automatically be on the prototype is that there&apos;s no way in the IDL to indicate whether this is writable.  It&apos;s clear if you have to explicitly include:

  attribute unsigned long length;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69276</commentid>
    <comment_count>5</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-06-20 05:36:46 +0000</bug_when>
    <thetext>Oh, #2 is bug 16833 actually.  I did #1:

  http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.530;r2=1.531;f=h

so I&apos;ll mark this bug fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>