[web-animations-1] Don't when an iterator returns null/undefined

Thu, 12 Apr 2018 09:36:09 +0200

author
Brian Birtles <[email protected]>
date
Thu, 12 Apr 2018 09:36:09 +0200
changeset 20930
27ab66373494
parent 20929
18e4fc04d97d
child 20931
60cddefac3fe

[web-animations-1] Don't when an iterator returns null/undefined

This brings the spec's handling of dictionary objects into line with
WebIDL which has:

> If Type(V) is not Undefined, Null or Object, then throw
> a TypeError.[1]

[1] https://heycam.github.io/webidl/#es-dictionary

Closes #2533.

web-animations-1/Overview.bs file | annotate | diff | comparison | revisions
     1.1 --- a/web-animations-1/Overview.bs	Wed Apr 11 21:32:27 2018 +0200
     1.2 +++ b/web-animations-1/Overview.bs	Thu Apr 12 09:36:09 2018 +0200
     1.3 @@ -126,6 +126,7 @@
     1.4      text: Promise; url: promise-objects
     1.5      text: PromiseCapability record; url: promisecapability-records
     1.6      text: Promise.resolve; url: promise.resolve
     1.7 +    text: Type; url: ecmascript-data-types-and-values
     1.8      text: well known symbols
     1.9      text: [[DefineOwnProperty]]; url: ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc
    1.10      text: [[Get]]; url: ordinary-object-internal-methods-and-internal-slots-get-p-receiver
    1.11 @@ -5179,9 +5180,9 @@
    1.12              1.  If <var>next</var> is false abort this loop.
    1.13              1.  Let <var>nextItem</var> be <a>IteratorValue</a>(next).
    1.14              1.  <a>Check the completion record</a> of <var>nextItem</var>.
    1.15 -            1.  If <var>nextItem</var> is not an object, throw a
    1.16 -                <span class=exceptionname>TypeError</span> and abort these
    1.17 -                steps.
    1.18 +            1.  If [=Type=](|nextItem|) is not Undefined, Null or Object, then
    1.19 +                throw a <span class=exceptionname>TypeError</span> and abort
    1.20 +                these steps.
    1.21              1.  Append to <var>processed keyframes</var> the result of
    1.22                  running the procedure to <a>process a keyframe-like object</a>
    1.23                  passing <var>nextItem</var> as the <var>keyframe input</var>

mercurial