Firefox setInterval passes Random number as parameter bug

I was working on a web development project. Until 30 minutes ago, I had discovered something strange with my code. It worked well on IE and Chrome but it created random results on Mozilla Firefox version 3.6.12. So i did some quick alert()s to find out whats went wrong. Surprisingly, I found out that  if you pass a callback function that can accept parameter into setInterval. It will pass random numbers into the callback function when it wasn't suppose to. I tried to start Firefox in safe mode and run the test again. Unfortunately, the bug still exists.

If you're geeky enough to watch the bug live in action just head over the demo page to reproduce the bug.

Update #1: I just tested the code with setTimeout() it seems like setTimeout() is affected as well.
Update #2: I just filed a report at Bugzilla@Mozilla.
Update #3: It was my mistake. :P It isn't a bug but an inconsistency between browsers.


我向来不是喜新厌旧之人。但手机毕竟是人类制造的,经不起日月的摧残(换手机的借口)。打从拥有了第一支手机起,前前后后我已换了好几架 (每一支都仍然能用哦)... 有的被我搁在家里,有的已换了新主人。物换星移,许许多多的事情一直在改变。在最新的手机里联络表也为了庆祝迁入新居而做出了一番整顿。它的脑海里已不再存有一直不舍丢弃的短讯 - 那些不该属于他的回忆。它们都被... 删除了。


She said that I'm a confidence person whom I think I'm not. A confidence person must be mentally strong and able to face challenges as well as projecting a strong image to others. A lot of things had happened in my life lately, my blog is just showing a tip of the iceberg. Some, which I had decided to withheld until I find the right time to write about them. I keep telling and convincing myself so that I can get to pass these phases. Saying that "Constants cannot be redefined" is merely another way to say "Whatever Happened, Happened". I always believe that things happen for a reason. We could either face it, change it or ignore it. I made up my mind to really deal with the problems and change my life. I have no idea what the changes will bring. Be it good or bad I believed this is what I need to do. It is a right thing to do... I suppose.