window.setTimeout is not working properly for long delays #1549

mjh563 opened this Issue May 6, 2012 · 2 comments


None yet

3 participants

mjh563 commented May 6, 2012

I've been having a problem with window.setTimeout. It only seems to work for low timeout values (up to about 4 seconds). With a longer delay, the callback function is never run.

For example, try this script:

// ==UserScript==
// @name Timeout test
// @include *
// ==/UserScript==

window.setTimeout (function() {alert ("At timeout");}, 2000);

The alert fires as expected after 2 seconds. But when I change 2000 to 5000, the alert never happens.

Using Firefox 12 and GM 0.9.19.

mjh563 commented May 7, 2012

Confirmed working OK on 0.9.18.

w35l3y commented May 11, 2012

Most of my scripts stopped working this morning after auto updating greasemonkey to 0.9.19 due to this same problem.
I recommended my users to disable auto updating and downgrade to 0.9.18

@arantius arantius added a commit that closed this issue May 11, 2012
@arantius arantius Revert "Inject a custom setTimeout method into the sandbox."
This reverts commit 7eccacb.

Fixes #1549, #1552, #1553
Refs #1209
@arantius arantius closed this in 88b9019 May 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment