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

Now with less bustage, I hope.

--HG--
extra : rebase_source : f422a9326391cafb0505390177f1d30379e366b7
This commit is contained in:
Justin Lebar 2011-10-31 22:33:24 -04:00
Родитель 1a82cd6839
Коммит 352344ecd7
4 изменённых файлов: 5 добавлений и 5 удалений

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

@ -66,6 +66,7 @@ nsSHEntry::nsSHEntry()
, mID(gEntryID++)
, mScrollPositionX(0)
, mScrollPositionY(0)
, mParent(nsnull)
, mURIWasModified(false)
{
mShared = new nsSHEntryShared();
@ -81,6 +82,7 @@ nsSHEntry::nsSHEntry(const nsSHEntry &other)
, mID(other.mID)
, mScrollPositionX(0) // XXX why not copy?
, mScrollPositionY(0) // XXX why not copy?
, mParent(other.mParent)
, mURIWasModified(other.mURIWasModified)
, mStateData(other.mStateData)
{
@ -417,7 +419,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 +432,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;