Skip to content

Commit

Permalink
Bug 804653 - Make destroying a private docshell update the global cou…
Browse files Browse the repository at this point in the history
…nt of private docshells instead of waiting an indefinite amount of time for the destructor. r=bz
  • Loading branch information
jdm committed Oct 30, 2012
1 parent 42bf588 commit 5578554
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,10 +825,6 @@ nsDocShell::~nsDocShell()
gNumberOfDocShells, mHistoryID);
}
#endif

if (mInPrivateBrowsing) {
DecreasePrivateDocShellCount();
}
}

nsresult
Expand Down Expand Up @@ -4915,6 +4911,12 @@ nsDocShell::Destroy()
// Cancel any timers that were set for this docshell; this is needed
// to break the cycle between us and the timers.
CancelRefreshURITimers();

if (mInPrivateBrowsing) {
mInPrivateBrowsing = false;
DecreasePrivateDocShellCount();
}

return NS_OK;
}

Expand Down

0 comments on commit 5578554

Please sign in to comment.