Bug 1028588 - Fix more, recently introduced dangerous public destructors - r=ehsan

This commit is contained in:
Benoit Jacob 2014-07-05 16:35:35 -04:00
Родитель 33d410adde
Коммит cb33a38711
7 изменённых файлов: 23 добавлений и 7 удалений

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

@ -43,10 +43,6 @@ public:
SetIsDOMBinding();
}
~DOMMatrixReadOnly()
{
}
#define GetMatrixMember(entry2D, entry3D, default) \
{ \
if (mMatrix3D) { \
@ -135,6 +131,10 @@ protected:
nsCOMPtr<nsISupports> mParent;
nsAutoPtr<gfx::Matrix> mMatrix2D;
nsAutoPtr<gfx::Matrix4x4> mMatrix3D;
~DOMMatrixReadOnly()
{
}
private:
DOMMatrixReadOnly() MOZ_DELETE;
DOMMatrixReadOnly(const DOMMatrixReadOnly&) MOZ_DELETE;
@ -248,6 +248,8 @@ public:
DOMMatrix* SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv);
private:
void Ensure3DMatrix();
~DOMMatrix() {}
};
}

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

@ -1385,7 +1385,6 @@ public:
NS_DECL_NSIDOMEVENTLISTENER
WebGLObserver(WebGLContext* aContext);
~WebGLObserver();
void Destroy();
@ -1396,6 +1395,8 @@ public:
void UnregisterMemoryPressureEvent();
private:
~WebGLObserver();
WebGLContext* mContext;
};

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

@ -68,6 +68,8 @@ public:
private:
IDBDatabase* mDatabase;
~VersionChangeListener() {}
};
NS_IMPL_ISUPPORTS(VersionChangeListener, nsIDOMEventListener)

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

@ -213,6 +213,9 @@ class ServiceWorkerUpdateInstance MOZ_FINAL : public nsISupports
nsCOMPtr<nsPIDOMWindow> mWindow;
bool mAborted;
~ServiceWorkerUpdateInstance() {}
public:
NS_DECL_ISUPPORTS

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

@ -19,11 +19,13 @@ public:
NS_DECL_NSIOBSERVER
nsNetworkLinkService();
virtual ~nsNetworkLinkService();
nsresult Init();
nsresult Shutdown();
protected:
virtual ~nsNetworkLinkService();
private:
bool mLinkUp;
bool mStatusKnown;

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

@ -25,7 +25,6 @@ class nsBaseClipboard : public nsIClipboard
public:
nsBaseClipboard();
virtual ~nsBaseClipboard();
//nsISupports
NS_DECL_ISUPPORTS
@ -34,6 +33,7 @@ public:
NS_DECL_NSICLIPBOARD
protected:
virtual ~nsBaseClipboard();
NS_IMETHOD SetNativeClipboardData ( int32_t aWhichClipboard ) = 0;
NS_IMETHOD GetNativeClipboardData ( nsITransferable * aTransferable, int32_t aWhichClipboard ) = 0;

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

@ -890,6 +890,9 @@ public:
return NS_OK;
}
private:
~DMDReporter() {}
};
NS_IMPL_ISUPPORTS(DMDReporter, nsIMemoryReporter)
@ -2009,6 +2012,9 @@ public:
// Do nothing; the reporter has already reported to DMD.
return NS_OK;
}
private:
~DoNothingCallback() {}
};
NS_IMPL_ISUPPORTS(DoNothingCallback, nsIHandleReportCallback)