зеркало из https://github.com/mozilla/pjs.git
Bug 552663, start timeouts asynchronously when jsd enables scripts, r=jst
This commit is contained in:
Родитель
7b57636d91
Коммит
87c3955517
|
@ -2454,8 +2454,9 @@ nsGlobalWindow::SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts)
|
|||
if (aEnabled && aFireTimeouts) {
|
||||
// Scripts are enabled (again?) on this context, run timeouts that
|
||||
// fired on this context while scripts were disabled.
|
||||
|
||||
RunTimeout(nsnull);
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
NS_NEW_RUNNABLE_METHOD(nsGlobalWindow, this, RunTimeout);
|
||||
NS_DispatchToCurrentThread(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -561,6 +561,7 @@ protected:
|
|||
|
||||
// The timeout implementation functions.
|
||||
void RunTimeout(nsTimeout *aTimeout);
|
||||
void RunTimeout() { RunTimeout(nsnull); }
|
||||
|
||||
void ClearAllTimeouts();
|
||||
// Insert aTimeout into the list, before all timeouts that would
|
||||
|
|
Загрузка…
Ссылка в новой задаче