Make nsEventStateManger support nsIWeakReference, so that they are not held onto as XPCOM observers. r=saari
git-svn-id: svn://10.0.0.236/trunk@68861 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
938d98bb07
commit
30537acb34
@ -229,7 +229,7 @@ nsEventStateManager::Observe(nsISupports *aSubject, const PRUnichar *aTopic,
|
||||
}
|
||||
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsEventStateManager, nsIEventStateManager)
|
||||
NS_IMPL_ISUPPORTS3(nsEventStateManager, nsIEventStateManager, nsIObserver, nsISupportsWeakReference)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsIDocument;
|
||||
class nsIScrollableView;
|
||||
@ -37,7 +38,8 @@ class nsISelfScrollingFrame;
|
||||
* Event listener manager
|
||||
*/
|
||||
|
||||
class nsEventStateManager : public nsIEventStateManager,
|
||||
class nsEventStateManager : public nsSupportsWeakReference,
|
||||
public nsIEventStateManager,
|
||||
public nsIObserver
|
||||
{
|
||||
|
||||
|
||||
@ -229,7 +229,7 @@ nsEventStateManager::Observe(nsISupports *aSubject, const PRUnichar *aTopic,
|
||||
}
|
||||
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsEventStateManager, nsIEventStateManager)
|
||||
NS_IMPL_ISUPPORTS3(nsEventStateManager, nsIEventStateManager, nsIObserver, nsISupportsWeakReference)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsIDocument;
|
||||
class nsIScrollableView;
|
||||
@ -37,7 +38,8 @@ class nsISelfScrollingFrame;
|
||||
* Event listener manager
|
||||
*/
|
||||
|
||||
class nsEventStateManager : public nsIEventStateManager,
|
||||
class nsEventStateManager : public nsSupportsWeakReference,
|
||||
public nsIEventStateManager,
|
||||
public nsIObserver
|
||||
{
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user