mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 612887, Try to fix a session history crash, r=jst, a=blocking
This commit is contained in:
parent
4a11f15b87
commit
913484fabb
@ -755,6 +755,12 @@ nsDocShell::~nsDocShell()
|
||||
{
|
||||
Destroy();
|
||||
|
||||
nsCOMPtr<nsISHistoryInternal>
|
||||
shPrivate(do_QueryInterface(mSessionHistory));
|
||||
if (shPrivate) {
|
||||
shPrivate->SetRootDocShell(nsnull);
|
||||
}
|
||||
|
||||
if (--gDocShellCount == 0) {
|
||||
NS_IF_RELEASE(sURIFixup);
|
||||
}
|
||||
|
@ -1209,7 +1209,9 @@ nsSHistory::RemoveDuplicate(PRInt32 aIndex, PRBool aKeepNext)
|
||||
// We're removing the very first session history transaction!
|
||||
mListRoot = txToKeep;
|
||||
}
|
||||
static_cast<nsDocShell*>(mRootDocShell)->HistoryTransactionRemoved(aIndex);
|
||||
if (mRootDocShell) {
|
||||
static_cast<nsDocShell*>(mRootDocShell)->HistoryTransactionRemoved(aIndex);
|
||||
}
|
||||
if (mIndex > aIndex) {
|
||||
mIndex = mIndex - 1;
|
||||
}
|
||||
@ -1589,6 +1591,8 @@ nsSHistory::CompareFrames(nsISHEntry * aPrevEntry, nsISHEntry * aNextEntry, nsID
|
||||
nsresult
|
||||
nsSHistory::InitiateLoad(nsISHEntry * aFrameEntry, nsIDocShell * aFrameDS, long aLoadType)
|
||||
{
|
||||
NS_ENSURE_STATE(aFrameDS && aFrameEntry);
|
||||
|
||||
nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
|
||||
|
||||
/* Set the loadType in the SHEntry too to what was passed on.
|
||||
|
Loading…
Reference in New Issue
Block a user