Release timeouts when a cached page is evicted from session history. Bug 302290, r=darin sr=jst a=brendan

This commit is contained in:
bryner%brianryner.com 2005-08-10 20:10:18 +00:00
Родитель 3dc4b0228b
Коммит 0b742bb6a7
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -6477,6 +6477,15 @@ WindowStateHolder::WindowStateHolder(JSContext *cx, JSObject *aObject,
WindowStateHolder::~WindowStateHolder()
{
// Release the timeouts, if we still have any.
nsTimeout *timeout = mSavedTimeouts;
while (timeout) {
nsTimeout *next = timeout->mNext;
NS_ASSERTION(!timeout->mTimer, "live timer in a saved window state");
timeout->Release(nsnull);
timeout = next;
}
::JS_RemoveRootRT(mRuntime, &mJSObj);
}