<?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>12287</bug_id>
          
          <creation_ts>2011-03-11 01:53:04 +0000</creation_ts>
          <short_desc>Restrict sequence&lt;T&gt; to operation argument types and return types</short_desc>
          <delta_ts>2011-05-23 21:41:30 +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>PC</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="Cameron McCormack">cam</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>bugs</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>46625</commentid>
    <comment_count>0</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2011-03-11 01:53:04 +0000</bug_when>
    <thetext>sequence&lt;T&gt; has undesirable behaviour in JS when used as an attribute value, so we should consider preventing its use there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46638</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-03-11 20:31:48 +0000</bug_when>
    <thetext>Would be good to have a recommended alternative to (e.g. a note saying to have a method return that type instead).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48684</commentid>
    <comment_count>2</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2011-05-23 01:23:02 +0000</bug_when>
    <thetext>Done: http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.270;r2=1.271;f=h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48690</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-05-23 09:32:08 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; sequence&lt;T&gt; has undesirable behaviour in JS when used as an attribute value, so
&gt; we should consider preventing its use there.

Just curious, what that undesirable behavior is? Is it that
JS can modify the array while native code is using it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48717</commentid>
    <comment_count>4</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2011-05-23 21:41:30 +0000</bug_when>
    <thetext>The undesirable behaviour is that a new Array object would be created every time you access the property.  Simple looping over a sequence attribute, like

  interface Blah {
    readonly attribute sequence&lt;long&gt; numbers;
  };

  for (var i = 0; i &lt; myBlah.numbers.length; i++) {
    doSomethingWith(myBlah.numbers[i]);
  }

would end up doing a lot of wasted work.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>