mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fixing bug 380476. Never register timeouts on unloaded windows objects. r=mrbkap@gmail.com, sr=jonas@sickin.cc
This commit is contained in:
parent
babbaa8a18
commit
3c78e3aafa
@ -6529,6 +6529,12 @@ nsGlobalWindow::SetTimeoutOrInterval(nsIScriptTimeoutHandler *aHandler,
|
||||
FORWARD_TO_INNER(SetTimeoutOrInterval, (aHandler, interval, aIsInterval, aReturn),
|
||||
NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
// If we don't have a document (we could have been unloaded since
|
||||
// the call to setTimeout was made), do nothing.
|
||||
if (!mDocument) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (interval < DOM_MIN_TIMEOUT_VALUE) {
|
||||
// Don't allow timeouts less than DOM_MIN_TIMEOUT_VALUE from
|
||||
// now...
|
||||
|
Loading…
Reference in New Issue
Block a user