Re: [heycam/webidl] Refactor integer conversion in ES bindings. (#235)

tobie commented on this pull request.



> @@ -6507,6 +6510,78 @@ when passed to a [=platform object=] expecting that type, and how IDL values
 of that type are <dfn id="dfn-convert-idl-to-ecmascript-value" export lt="converted to an ECMAScript value|converted to ECMAScript values">converted to ECMAScript values</dfn>
 when returned from a platform object.
 
+<div algorithm>
+
+    <dfn lt="AssertFinite" abstract-op>AssertFinite(|v|)</dfn>:
+
+    1.  Let |r| be [=!=][=isFinite=](|v|).
+    1.  If |r| is <emu-val>false</emu-val>,
+        then <a lt="es throw">throw a <emu-val>TypeError</emu-val></a>.
+</div>
+
+<div algorithm>
+
+    <dfn lt="IntegerPart" abstract-op>IntegerPart(|n|)</dfn>:
+
+    1.  Let |r| be [=floor=]([=abs=](|n|))
+    1.  If |n| &lt; 0, then return -1 * |r|.

Fixed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/235

Received on Friday, 11 November 2016 16:49:33 UTC