зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1281762 - nsWindowRoot::mPopupNode may keep otherwise closed documents alive, r=enn
This commit is contained in:
Родитель
449fff0af3
Коммит
fd266b20b2
|
@ -58,7 +58,6 @@ nsWindowRoot::~nsWindowRoot()
|
|||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsWindowRoot,
|
||||
mWindow,
|
||||
mListenerManager,
|
||||
mPopupNode,
|
||||
mParent)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsWindowRoot)
|
||||
|
@ -372,13 +371,14 @@ nsWindowRoot::GetEnabledDisabledCommands(nsTArray<nsCString>& aEnabledCommands,
|
|||
nsIDOMNode*
|
||||
nsWindowRoot::GetPopupNode()
|
||||
{
|
||||
return mPopupNode;
|
||||
nsCOMPtr<nsIDOMNode> popupNode = do_QueryReferent(mPopupNode);
|
||||
return popupNode;
|
||||
}
|
||||
|
||||
void
|
||||
nsWindowRoot::SetPopupNode(nsIDOMNode* aNode)
|
||||
{
|
||||
mPopupNode = aNode;
|
||||
mPopupNode = do_GetWeakReference(aNode);
|
||||
}
|
||||
|
||||
nsIGlobalObject*
|
||||
|
|
|
@ -13,6 +13,7 @@ class nsIGlobalObject;
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/EventListenerManager.h"
|
||||
#include "nsIDOMEventTarget.h"
|
||||
#include "nsIWeakReferenceUtils.h"
|
||||
#include "nsPIWindowRoot.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsTHashtable.h"
|
||||
|
@ -103,7 +104,7 @@ protected:
|
|||
nsCOMPtr<nsPIDOMWindowOuter> mWindow;
|
||||
// We own the manager, which owns event listeners attached to us.
|
||||
RefPtr<mozilla::EventListenerManager> mListenerManager; // [Strong]
|
||||
nsCOMPtr<nsIDOMNode> mPopupNode; // [OWNER]
|
||||
nsWeakPtr mPopupNode;
|
||||
|
||||
// True if focus rings and accelerators are enabled for this
|
||||
// window hierarchy.
|
||||
|
|
Загрузка…
Ссылка в новой задаче