<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Conversion to sequence&lt;T&gt; is broken for iterable objects"
   href="https://bugs.webkit.org/show_bug.cgi?id=160801">160801</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Conversion to sequence&lt;T&gt; is broken for iterable objects
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Bindings
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rniwa&#64;webkit.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>cdumez&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>We need to implement <a href="http://heycam.github.io/webidl/#es-sequence">http://heycam.github.io/webidl/#es-sequence</a>

An ECMAScript value V is converted to an IDL sequence&lt;T&gt; value as follows:

1. If V is not an object, throw a TypeError.
2. If V is a native RegEx object, throw a TypeError.
3. Let method be the result of GetMethod(V, &#64;&#64;iterator).
4. ReturnIfAbrupt(method).
5. If method is undefined, throw a TypeError.
7. Return the result of creating a sequence of type sequence&lt;T&gt; from V and method.

Creating a sequence from an iterable: <a href="http://heycam.github.io/webidl/#create-sequence-from-iterable">http://heycam.github.io/webidl/#create-sequence-from-iterable</a>

1. Let tier be GetIterator(iterable, method).
2. ReturnIfAbrupt(iter).
3. Initialize i to be 0.
4. Repeat
    1. Let next be IteratorStep(tier).
    2. ReturnIfAbrupt(next).
    3. If next is false, then return an IDL sequence value of type sequence&lt;T&gt; of length i, where the value of the element at index j is Sj.
    4. Let nextItem be IteratorValue(next).
    5. ReturnIfAbrupt(nextItem).
    6. Initialize Si to the result of converting nextItem to an IDL value of type T.
    7. Set i to i + 1.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>