Closed Bug 512259 Opened 15 years ago Closed 15 years ago

setTimeout and setInterval should not pass anything to their function by default

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 394769

People

(Reporter: jwatt, Unassigned)

Details

Attachments

(1 file)

setTimeout and setInterval seem to pass an int to their function when not given any arguments to pass. Worse still, the value changes randomly. Usually it's 0 or -1, but I've seen many other negative numbers.
Attached image testcase
Sit and watch the testcase, and you'll see it intermittently change from green to red and back again.
Confirmed on Linux m-c trunk, as well as in Firefox 2. :)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20090820 Minefield/3.7a1pre
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18
OS: Mac OS X → All
Hardware: x86 → All
Assignee: nobody → general
Component: Virtual Machine → JavaScript Engine
Product: Tamarin → Core
QA Contact: vm → general
Version: unspecified → Trunk
Old Netscape extension, it's the "lateness" of the timeout. From Netscape 3 or 4. Time to lose it.

/be
I'll mention bug 394769 here as Gavin added a number of CCs who may be interested.

Traditionally this has been bug 10637
I suggest duping this to bug 394769 and confirming that bug; we can let bug 10637 stand for its day when it was indeed WONTFIX. Thanks for finding these bugs.

/be
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Should that bug be moved to JavaScript Engine, Brendan?
(In reply to comment #8)
> Should that bug be moved to JavaScript Engine, Brendan?

No, setTimeout and related APIs are DOM APIs, the JS engine doesn't have anything to do with them (other than running the timeout, of course!).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: