зеркало из https://github.com/mozilla/pjs.git
Bug 707870 - Disconnect mListenerManager in nsDOMEventTargetHelper instead of expecting inheriting classes to do it. r=smaug
This commit is contained in:
Родитель
4e70f64027
Коммит
89296557c6
|
@ -88,12 +88,6 @@ FileIOObject::FileIOObject()
|
|||
mTotal(0), mTransferred(0)
|
||||
{}
|
||||
|
||||
FileIOObject::~FileIOObject()
|
||||
{
|
||||
if (mListenerManager)
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
|
||||
void
|
||||
FileIOObject::StartProgressEventTimer()
|
||||
{
|
||||
|
|
|
@ -63,7 +63,6 @@ class FileIOObject : public nsDOMEventTargetWrapperCache,
|
|||
{
|
||||
public:
|
||||
FileIOObject();
|
||||
~FileIOObject();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
|
@ -97,11 +97,6 @@ nsEventSource::nsEventSource() :
|
|||
nsEventSource::~nsEventSource()
|
||||
{
|
||||
Close();
|
||||
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
mListenerManager = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -120,10 +120,6 @@ nsInProcessTabChildGlobal::nsInProcessTabChildGlobal(nsIDocShell* aShell,
|
|||
nsInProcessTabChildGlobal::~nsInProcessTabChildGlobal()
|
||||
{
|
||||
NS_ASSERTION(!mCx, "Couldn't release JSContext?!?");
|
||||
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -400,10 +400,7 @@ nsWebSocket::nsWebSocket() : mKeepingAlive(false),
|
|||
nsWebSocket::~nsWebSocket()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
mListenerManager = nsnull;
|
||||
}
|
||||
|
||||
Disconnect();
|
||||
nsLayoutStatics::Release();
|
||||
}
|
||||
|
|
|
@ -401,13 +401,6 @@ nsXHREventTarget::SetOnloadend(nsIDOMEventListener* aOnLoadend)
|
|||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
nsXMLHttpRequestUpload::~nsXMLHttpRequestUpload()
|
||||
{
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
DOMCI_DATA(XMLHttpRequestUpload, nsXMLHttpRequestUpload)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsXMLHttpRequestUpload)
|
||||
|
@ -447,10 +440,6 @@ nsXMLHttpRequest::nsXMLHttpRequest()
|
|||
|
||||
nsXMLHttpRequest::~nsXMLHttpRequest()
|
||||
{
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
|
||||
if (mState & (XML_HTTP_REQUEST_STOPPED |
|
||||
XML_HTTP_REQUEST_SENT |
|
||||
XML_HTTP_REQUEST_LOADING)) {
|
||||
|
|
|
@ -100,7 +100,6 @@ public:
|
|||
mOwner = aOwner;
|
||||
mScriptContext = aScriptContext;
|
||||
}
|
||||
virtual ~nsXMLHttpRequestUpload();
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_FORWARD_NSIXMLHTTPREQUESTEVENTTARGET(nsXHREventTarget::)
|
||||
NS_FORWARD_NSIDOMEVENTTARGET(nsXHREventTarget::)
|
||||
|
|
|
@ -90,6 +90,13 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMEventTargetHelper)
|
|||
|
||||
NS_IMPL_DOMTARGET_DEFAULTS(nsDOMEventTargetHelper);
|
||||
|
||||
nsDOMEventTargetHelper::~nsDOMEventTargetHelper()
|
||||
{
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMEventTargetHelper::RemoveEventListener(const nsAString& aType,
|
||||
nsIDOMEventListener* aListener,
|
||||
|
|
|
@ -69,7 +69,7 @@ class nsDOMEventTargetHelper : public nsIDOMEventTarget
|
|||
{
|
||||
public:
|
||||
nsDOMEventTargetHelper() {}
|
||||
virtual ~nsDOMEventTargetHelper() {}
|
||||
virtual ~nsDOMEventTargetHelper();
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(nsDOMEventTargetHelper)
|
||||
|
||||
|
|
|
@ -91,13 +91,6 @@ BatteryManager::BatteryManager()
|
|||
{
|
||||
}
|
||||
|
||||
BatteryManager::~BatteryManager()
|
||||
{
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BatteryManager::Init(nsPIDOMWindow *aWindow, nsIScriptContext* aScriptContext)
|
||||
{
|
||||
|
|
|
@ -66,7 +66,6 @@ public:
|
|||
NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetWrapperCache::)
|
||||
|
||||
BatteryManager();
|
||||
virtual ~BatteryManager();
|
||||
|
||||
void Init(nsPIDOMWindow *aWindow, nsIScriptContext* aScriptContext);
|
||||
void Shutdown();
|
||||
|
|
|
@ -203,10 +203,6 @@ IDBDatabase::~IDBDatabase()
|
|||
mgr->UnregisterDatabase(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -77,10 +77,6 @@ IDBRequest::~IDBRequest()
|
|||
// false.
|
||||
UnrootResultVal();
|
||||
}
|
||||
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
@ -181,10 +181,6 @@ IDBTransaction::~IDBTransaction()
|
|||
NS_ASSERTION(!mConnection, "Should have called CommitOrRollback!");
|
||||
NS_ASSERTION(!mCreating, "Should have been cleared already!");
|
||||
NS_ASSERTION(mFiredCompleteOrAbort, "Should have fired event!");
|
||||
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -999,13 +999,6 @@ TabChildGlobal::TabChildGlobal(TabChild* aTabChild)
|
|||
aTabChild->GetJSContext());
|
||||
}
|
||||
|
||||
TabChildGlobal::~TabChildGlobal()
|
||||
{
|
||||
if (mListenerManager) {
|
||||
mListenerManager->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(TabChildGlobal)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(TabChildGlobal,
|
||||
|
|
|
@ -94,7 +94,6 @@ class TabChildGlobal : public nsDOMEventTargetWrapperCache,
|
|||
{
|
||||
public:
|
||||
TabChildGlobal(TabChild* aTabChild);
|
||||
~TabChildGlobal();
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TabChildGlobal, nsDOMEventTargetWrapperCache)
|
||||
NS_FORWARD_SAFE_NSIFRAMEMESSAGEMANAGER(mMessageManager)
|
||||
|
|
Загрузка…
Ссылка в новой задаче