Bug 633421. Throttle timeouts in background tabs to 500ms, noot 10ms. r=jst

This commit is contained in:
Boris Zbarsky
2011-03-25 21:05:55 -04:00
parent bd17cd9b70
commit dd3f1d01ae
5 changed files with 50 additions and 15 deletions

View File

@@ -4843,6 +4843,12 @@ nsDocShell::SetIsActive(PRBool aIsActive)
if (pshell)
pshell->SetIsActive(aIsActive);
// Tell the window about it
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(mScriptGlobal);
if (win) {
win->SetIsBackground(!aIsActive);
}
// Recursively tell all of our children
PRInt32 n = mChildList.Count();
for (PRInt32 i = 0; i < n; ++i) {