Bug 698656 - mParent pointer should be on nsSHEntry, not nsSHEntryShared. r=bz

This commit is contained in:
Justin Lebar 2011-10-31 22:33:24 -04:00
Родитель a4243e7ce4
Коммит 5144bf3199
4 изменённых файлов: 4 добавлений и 5 удалений

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

@ -81,6 +81,7 @@ nsSHEntry::nsSHEntry(const nsSHEntry &other)
, mID(other.mID)
, mScrollPositionX(0) // XXX why not copy?
, mScrollPositionY(0) // XXX why not copy?
, mParent(nsnull)
, mURIWasModified(other.mURIWasModified)
, mStateData(other.mStateData)
{
@ -417,7 +418,7 @@ NS_IMETHODIMP
nsSHEntry::GetParent(nsISHEntry ** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mShared->mParent;
*aResult = mParent;
NS_IF_ADDREF(*aResult);
return NS_OK;
}
@ -430,7 +431,7 @@ nsSHEntry::SetParent(nsISHEntry * aParent)
*
* XXX this method should not be scriptable if this is the case!!
*/
mShared->mParent = aParent;
mParent = aParent;
return NS_OK;
}

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

@ -90,6 +90,7 @@ private:
PRUint32 mID;
PRInt32 mScrollPositionX;
PRInt32 mScrollPositionY;
nsISHEntry* mParent;
nsCOMArray<nsISHEntry> mChildren;
bool mURIWasModified;
nsCOMPtr<nsIStructuredCloneContainer> mStateData;

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

@ -93,7 +93,6 @@ nsSHEntryShared::Shutdown()
nsSHEntryShared::nsSHEntryShared()
: mDocShellID(0)
, mParent(nsnull)
, mIsFrameNavigation(false)
, mSaveLayoutState(true)
, mSticky(true)
@ -136,7 +135,6 @@ nsSHEntryShared::Duplicate(nsSHEntryShared *aEntry)
newEntry->mDocShellID = aEntry->mDocShellID;
newEntry->mChildShells.AppendObjects(aEntry->mChildShells);
newEntry->mOwner = aEntry->mOwner;
newEntry->mParent = aEntry->mParent;
newEntry->mContentType.Assign(aEntry->mContentType);
newEntry->mIsFrameNavigation = aEntry->mIsFrameNavigation;
newEntry->mSaveLayoutState = aEntry->mSaveLayoutState;

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

@ -99,7 +99,6 @@ class nsSHEntryShared : public nsIBFCacheEntry,
PRUint64 mDocShellID;
nsCOMArray<nsIDocShellTreeItem> mChildShells;
nsCOMPtr<nsISupports> mOwner;
nsISHEntry* mParent;
nsCString mContentType;
bool mIsFrameNavigation;
bool mSaveLayoutState;