[Webkit-unassigned] [Bug 160801] New: Conversion to sequence<T> is broken for iterable objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 12 00:18:09 PDT 2016


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

            Bug ID: 160801
           Summary: Conversion to sequence<T> is broken for iterable
                    objects
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Bindings
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: rniwa at webkit.org
                CC: cdumez at apple.com

We need to implement http://heycam.github.io/webidl/#es-sequence

An ECMAScript value V is converted to an IDL sequence<T> 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, @@iterator).
4. ReturnIfAbrupt(method).
5. If method is undefined, throw a TypeError.
7. Return the result of creating a sequence of type sequence<T> from V and method.

Creating a sequence from an iterable: http://heycam.github.io/webidl/#create-sequence-from-iterable

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<T> 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160812/706e0d13/attachment.html>


More information about the webkit-unassigned mailing list