Is this expected behavior?

Here’s what was happening:

new Date().getTime() // 1557743641710

But it was compiling to this:
new Date().getTime() >> 0 // -1329237855

> On May 13, 2019, at 1:37 PM, [email protected] wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> harbs pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> 
> The following commit(s) were added to refs/heads/develop by this push:
>     new 1c29abd  new Date().getTimenis too big for an int
> 1c29abd is described below
> 
> commit 1c29abdb340242ab29a2700fffd38ba2619d7928
> Author: Harbs <[email protected]>
> AuthorDate: Mon May 13 13:37:22 2019 +0300
> 
>    new Date().getTimenis too big for an int
> 
>    It overflows to a negative number.
> ---
> .../src/main/royale/org/apache/royale/html/beads/InfiniteVScroller.as | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git 
> a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/InfiniteVScroller.as
>  
> b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/InfiniteVScroller.as
> index 58992c7..9000e10 100644
> --- 
> a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/InfiniteVScroller.as
> +++ 
> b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/InfiniteVScroller.as
> @@ -125,7 +125,7 @@ package org.apache.royale.html.beads
>                       }
>               }
>               COMPILE::JS
> -             private var lastTime:int = 0;
> +             private var lastTime:Number = 0;
>               
>               COMPILE::JS
>               private var lastTop:Number = 0;
> @@ -145,7 +145,7 @@ package org.apache.royale.html.beads
> 
>                       if(elem.offsetHeight + top >= elem.scrollHeight - 
> _offset)
>                       {
> -                             var time:int = new Date().getTime();
> +                             var time:Number = new Date().getTime();
>                               if(time - lastTime < _interval)
>                                       return;
>                               lastTime = time;
> 

Reply via email to