diff --git a/content/base/public/Element.h b/content/base/public/Element.h index ece84ec9b1a..0cea925b8e5 100644 --- a/content/base/public/Element.h +++ b/content/base/public/Element.h @@ -1192,7 +1192,6 @@ class DestinationInsertionPointList : public nsINodeList { public: DestinationInsertionPointList(Element* aElement); - virtual ~DestinationInsertionPointList(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(DestinationInsertionPointList) @@ -1207,6 +1206,8 @@ public: virtual uint32_t Length() const; virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: + virtual ~DestinationInsertionPointList(); + nsRefPtr mParent; nsCOMArray mDestinationPoints; }; diff --git a/content/base/public/FragmentOrElement.h b/content/base/public/FragmentOrElement.h index d01878182e9..5353ea1e521 100644 --- a/content/base/public/FragmentOrElement.h +++ b/content/base/public/FragmentOrElement.h @@ -78,6 +78,8 @@ public: } private: + ~nsChildContentList() {} + // The node whose children make up the list (weak reference) nsINode* mNode; }; @@ -117,8 +119,6 @@ public: { } - ~nsNodeWeakReference(); - // nsISupports NS_DECL_ISUPPORTS @@ -132,6 +132,8 @@ public: } private: + ~nsNodeWeakReference(); + nsINode* mNode; }; @@ -155,6 +157,8 @@ public: NS_DECL_CYCLE_COLLECTION_CLASS(nsNodeSupportsWeakRefTearoff) private: + ~nsNodeSupportsWeakRefTearoff() {} + nsCOMPtr mNode; }; @@ -173,7 +177,6 @@ class FragmentOrElement : public nsIContent public: FragmentOrElement(already_AddRefed& aNodeInfo); FragmentOrElement(already_AddRefed&& aNodeInfo); - virtual ~FragmentOrElement(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -293,6 +296,8 @@ public: void* aData); protected: + virtual ~FragmentOrElement(); + /** * Copy attributes and state to another element * @param aDest the object to copy to diff --git a/content/base/public/nsDOMFile.h b/content/base/public/nsDOMFile.h index 0f6854a99c1..04bbae6eef3 100644 --- a/content/base/public/nsDOMFile.h +++ b/content/base/public/nsDOMFile.h @@ -185,6 +185,9 @@ public: { } NS_DECL_THREADSAFE_ISUPPORTS + +protected: + ~nsDOMFile() {} }; class nsDOMFileCC : public nsDOMFileBase @@ -206,6 +209,9 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsDOMFileCC, nsIDOMFile) + +protected: + ~nsDOMFileCC() {} }; class nsDOMFileFile : public nsDOMFile @@ -307,6 +313,8 @@ public: void SetPath(const nsAString& aFullPath); protected: + ~nsDOMFileFile() {} + // Create slice nsDOMFileFile(const nsDOMFileFile* aOther, uint64_t aStart, uint64_t aLength, const nsAString& aContentType) @@ -387,6 +395,8 @@ public: NS_IMETHOD_(bool) IsMemoryFile(void) MOZ_OVERRIDE; protected: + ~nsDOMMemoryFile() {} + // Create slice nsDOMMemoryFile(const nsDOMMemoryFile* aOther, uint64_t aStart, uint64_t aLength, const nsAString& aContentType) @@ -455,6 +465,8 @@ protected: class nsDOMFileList MOZ_FINAL : public nsIDOMFileList, public nsWrapperCache { + ~nsDOMFileList() {} + public: nsDOMFileList(nsISupports *aParent) : mParent(aParent) { diff --git a/content/base/public/nsHostObjectProtocolHandler.h b/content/base/public/nsHostObjectProtocolHandler.h index 6f18b656125..426b7b60912 100644 --- a/content/base/public/nsHostObjectProtocolHandler.h +++ b/content/base/public/nsHostObjectProtocolHandler.h @@ -31,7 +31,6 @@ class nsHostObjectProtocolHandler : public nsIProtocolHandler { public: nsHostObjectProtocolHandler(); - virtual ~nsHostObjectProtocolHandler() {} NS_DECL_ISUPPORTS // nsIProtocolHandler methods, except for GetScheme which is only defined @@ -55,6 +54,9 @@ public: static nsIPrincipal* GetDataEntryPrincipal(const nsACString& aUri); static void Traverse(const nsACString& aUri, nsCycleCollectionTraversalCallback& aCallback); +protected: + virtual ~nsHostObjectProtocolHandler() {} + private: static void Init(void); }; diff --git a/content/base/public/nsReferencedElement.h b/content/base/public/nsReferencedElement.h index 8183cf4a6a2..e969636c997 100644 --- a/content/base/public/nsReferencedElement.h +++ b/content/base/public/nsReferencedElement.h @@ -165,11 +165,12 @@ private: mRef = aRef; } } - virtual ~DocumentLoadNotification() {} NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER private: + virtual ~DocumentLoadNotification() {} + virtual void SetTo(Element* aTo) { } nsString mRef; diff --git a/content/base/src/Attr.h b/content/base/src/Attr.h index 4fc054440bf..16a118c8ed7 100644 --- a/content/base/src/Attr.h +++ b/content/base/src/Attr.h @@ -30,12 +30,13 @@ namespace dom { class Attr MOZ_FINAL : public nsIAttribute, public nsIDOMAttr { + virtual ~Attr() {} + public: Attr(nsDOMAttributeMap* aAttrMap, already_AddRefed&& aNodeInfo, const nsAString& aValue, bool aNsAware); - virtual ~Attr() {} NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/content/base/src/DOMImplementation.h b/content/base/src/DOMImplementation.h index 8efa43cbc8f..fb986b55674 100644 --- a/content/base/src/DOMImplementation.h +++ b/content/base/src/DOMImplementation.h @@ -27,6 +27,10 @@ class DocumentType; class DOMImplementation MOZ_FINAL : public nsIDOMDOMImplementation , public nsWrapperCache { + ~DOMImplementation() + { + } + public: DOMImplementation(nsIDocument* aOwner, nsIGlobalObject* aScriptObject, @@ -41,10 +45,6 @@ public: SetIsDOMBinding(); } - ~DOMImplementation() - { - } - NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMImplementation) diff --git a/content/base/src/DOMParser.h b/content/base/src/DOMParser.h index 9f902df94bd..0716f68a7c5 100644 --- a/content/base/src/DOMParser.h +++ b/content/base/src/DOMParser.h @@ -25,9 +25,11 @@ class DOMParser MOZ_FINAL : public nsIDOMParser, public nsWrapperCache { typedef mozilla::dom::GlobalObject GlobalObject; + + virtual ~DOMParser(); + public: DOMParser(); - virtual ~DOMParser(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(DOMParser, diff --git a/content/base/src/DOMPoint.h b/content/base/src/DOMPoint.h index 670bd12eed1..c3636aec08f 100644 --- a/content/base/src/DOMPoint.h +++ b/content/base/src/DOMPoint.h @@ -46,6 +46,8 @@ protected: class DOMPoint MOZ_FINAL : public DOMPointReadOnly { + ~DOMPoint() {} + public: DOMPoint(nsISupports* aParent, double aX = 0.0, double aY = 0.0, double aZ = 0.0, double aW = 1.0) diff --git a/content/base/src/DOMQuad.h b/content/base/src/DOMQuad.h index fd562107381..b89aecdbc61 100644 --- a/content/base/src/DOMQuad.h +++ b/content/base/src/DOMQuad.h @@ -25,10 +25,11 @@ struct DOMPointInit; class DOMQuad MOZ_FINAL : public nsWrapperCache { + ~DOMQuad(); + public: DOMQuad(nsISupports* aParent, CSSPoint aPoints[4]); DOMQuad(nsISupports* aParent); - ~DOMQuad(); NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMQuad) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMQuad) diff --git a/content/base/src/DOMRect.h b/content/base/src/DOMRect.h index 0d9b701173c..3b6a9f5f96a 100644 --- a/content/base/src/DOMRect.h +++ b/content/base/src/DOMRect.h @@ -26,12 +26,13 @@ namespace dom { class DOMRectReadOnly : public nsISupports , public nsWrapperCache { +protected: + virtual ~DOMRectReadOnly() {} + public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMRectReadOnly) - virtual ~DOMRectReadOnly() {} - DOMRectReadOnly(nsISupports* aParent) : mParent(aParent) { @@ -146,6 +147,8 @@ protected: class DOMRectList MOZ_FINAL : public nsIDOMClientRectList, public nsWrapperCache { + ~DOMRectList() {} + public: DOMRectList(nsISupports *aParent) : mParent(aParent) { diff --git a/content/base/src/DOMStringList.h b/content/base/src/DOMStringList.h index 6af01f6665e..bad5db70faf 100644 --- a/content/base/src/DOMStringList.h +++ b/content/base/src/DOMStringList.h @@ -17,12 +17,14 @@ namespace dom { class DOMStringList : public nsISupports, public nsWrapperCache { +protected: + virtual ~DOMStringList(); + public: DOMStringList() { SetIsDOMBinding(); } - virtual ~DOMStringList(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList) diff --git a/content/base/src/EventSource.cpp b/content/base/src/EventSource.cpp index 110afd05614..a94ac100db8 100644 --- a/content/base/src/EventSource.cpp +++ b/content/base/src/EventSource.cpp @@ -518,6 +518,7 @@ public: } private: + ~AsyncVerifyRedirectCallbackFwr() {} nsRefPtr mEventSource; }; diff --git a/content/base/src/ImportManager.h b/content/base/src/ImportManager.h index 65e957d8512..443068bc208 100644 --- a/content/base/src/ImportManager.h +++ b/content/base/src/ImportManager.h @@ -88,6 +88,8 @@ public: } private: + ~ImportLoader() {} + // If a new referrer LinkElement was added, let's // see if we are already finished and if so fire // the right event. @@ -129,6 +131,9 @@ private: class ImportManager MOZ_FINAL : public nsISupports { typedef nsRefPtrHashtable ImportMap; + + ~ImportManager() {} + public: ImportManager() {} diff --git a/content/base/src/NodeIterator.h b/content/base/src/NodeIterator.h index c7c3cf3061d..29edaf76164 100644 --- a/content/base/src/NodeIterator.h +++ b/content/base/src/NodeIterator.h @@ -115,6 +115,13 @@ private: }; } // namespace dom + +template<> +struct HasDangerousPublicDestructor +{ + static const bool value = true; +}; + } // namespace mozilla #endif // mozilla_dom_NodeIterator_h diff --git a/content/base/src/ResponsiveImageSelector.h b/content/base/src/ResponsiveImageSelector.h index a4f9fe2f863..dc1a60cca23 100644 --- a/content/base/src/ResponsiveImageSelector.h +++ b/content/base/src/ResponsiveImageSelector.h @@ -20,7 +20,6 @@ class ResponsiveImageSelector : public nsISupports public: NS_DECL_ISUPPORTS ResponsiveImageSelector(nsIContent *aContent); - virtual ~ResponsiveImageSelector(); // Given a srcset string, parse and replace current candidates (does not // replace default source) @@ -34,6 +33,9 @@ public: already_AddRefed GetSelectedImageURL(); double GetSelectedImageDensity(); +protected: + virtual ~ResponsiveImageSelector(); + private: // Append a candidate unless its selector is duplicated by a higher priority // candidate diff --git a/content/base/src/StyleSheetList.h b/content/base/src/StyleSheetList.h index 59c5c9ac435..88badb55ede 100644 --- a/content/base/src/StyleSheetList.h +++ b/content/base/src/StyleSheetList.h @@ -24,7 +24,6 @@ public: { SetIsDOMBinding(); } - virtual ~StyleSheetList() {} NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList) @@ -41,6 +40,9 @@ public: bool dummy = false; return IndexedGetter(aIndex, dummy); } + +protected: + virtual ~StyleSheetList() {} }; } // namespace dom diff --git a/content/base/src/ThirdPartyUtil.h b/content/base/src/ThirdPartyUtil.h index 3f50ac3926e..d6bcbe44d7b 100644 --- a/content/base/src/ThirdPartyUtil.h +++ b/content/base/src/ThirdPartyUtil.h @@ -24,6 +24,8 @@ public: nsresult Init(); private: + ~ThirdPartyUtil() {} + nsresult IsThirdPartyInternal(const nsCString& aFirstDomain, nsIURI* aSecondURI, bool* aResult); static already_AddRefed GetURIFromWindow(nsIDOMWindow* aWin); diff --git a/content/base/src/TreeWalker.h b/content/base/src/TreeWalker.h index 866ee83040e..d946a45175d 100644 --- a/content/base/src/TreeWalker.h +++ b/content/base/src/TreeWalker.h @@ -25,6 +25,8 @@ namespace dom { class TreeWalker MOZ_FINAL : public nsIDOMTreeWalker, public nsTraversal { + virtual ~TreeWalker(); + public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSIDOMTREEWALKER @@ -32,7 +34,6 @@ public: TreeWalker(nsINode *aRoot, uint32_t aWhatToShow, const NodeFilterHolder &aFilter); - virtual ~TreeWalker(); NS_DECL_CYCLE_COLLECTION_CLASS(TreeWalker) diff --git a/content/base/src/nsCCUncollectableMarker.h b/content/base/src/nsCCUncollectableMarker.h index d9234acee31..9c741af2f56 100644 --- a/content/base/src/nsCCUncollectableMarker.h +++ b/content/base/src/nsCCUncollectableMarker.h @@ -38,7 +38,7 @@ class nsCCUncollectableMarker MOZ_FINAL : public nsIObserver private: nsCCUncollectableMarker() {} - + ~nsCCUncollectableMarker() {} }; namespace mozilla { diff --git a/content/base/src/nsCSPContext.h b/content/base/src/nsCSPContext.h index 023da4c7c1e..ef53a910886 100644 --- a/content/base/src/nsCSPContext.h +++ b/content/base/src/nsCSPContext.h @@ -30,9 +30,11 @@ class nsCSPContext : public nsIContentSecurityPolicy NS_DECL_NSICONTENTSECURITYPOLICY NS_DECL_NSISERIALIZABLE + protected: + virtual ~nsCSPContext(); + public: nsCSPContext(); - virtual ~nsCSPContext(); nsresult SendReports(nsISupports* aBlockedContentSource, nsIURI* aOriginalURI, @@ -76,6 +78,8 @@ class CSPViolationReportListener : public nsIStreamListener public: CSPViolationReportListener(); + + protected: virtual ~CSPViolationReportListener(); }; @@ -92,6 +96,8 @@ class CSPReportRedirectSink MOZ_FINAL : public nsIChannelEventSink, public: CSPReportRedirectSink(); + + protected: virtual ~CSPReportRedirectSink(); }; diff --git a/content/base/src/nsCSPService.h b/content/base/src/nsCSPService.h index 655ac499b4e..0654123eec2 100644 --- a/content/base/src/nsCSPService.h +++ b/content/base/src/nsCSPService.h @@ -25,9 +25,12 @@ public: NS_DECL_NSICHANNELEVENTSINK CSPService(); - virtual ~CSPService(); static bool sCSPEnabled; static bool sNewBackendEnabled; + +protected: + virtual ~CSPService(); + private: // Maps origins to app status. nsDataHashtable mAppStatusCache; diff --git a/content/base/src/nsChannelPolicy.h b/content/base/src/nsChannelPolicy.h index a6adabf78f8..f5a0ba29f0e 100644 --- a/content/base/src/nsChannelPolicy.h +++ b/content/base/src/nsChannelPolicy.h @@ -21,9 +21,10 @@ public: NS_DECL_NSICHANNELPOLICY nsChannelPolicy(); - virtual ~nsChannelPolicy(); protected: + virtual ~nsChannelPolicy(); + /* Represents the type of content being loaded in the channel per * nsIContentPolicy, e.g. TYPE_IMAGE, TYPE_SCRIPT */ diff --git a/content/base/src/nsContentAreaDragDrop.h b/content/base/src/nsContentAreaDragDrop.h index 47b95bcb8a5..091502e575c 100644 --- a/content/base/src/nsContentAreaDragDrop.h +++ b/content/base/src/nsContentAreaDragDrop.h @@ -68,12 +68,12 @@ public: // ensures that the image data is only created when an image drop is allowed. class nsContentAreaDragDropDataProvider : public nsIFlavorDataProvider { + virtual ~nsContentAreaDragDropDataProvider() {} + public: NS_DECL_ISUPPORTS NS_DECL_NSIFLAVORDATAPROVIDER - virtual ~nsContentAreaDragDropDataProvider() {} - nsresult SaveURIToFile(nsAString& inSourceURIString, nsIFile* inDestFile, bool isPrivate); }; diff --git a/content/base/src/nsContentIterator.cpp b/content/base/src/nsContentIterator.cpp index 3bf3b29927a..2e5ea6b0b97 100644 --- a/content/base/src/nsContentIterator.cpp +++ b/content/base/src/nsContentIterator.cpp @@ -83,7 +83,6 @@ public: NS_DECL_CYCLE_COLLECTION_CLASS(nsContentIterator) explicit nsContentIterator(bool aPre); - virtual ~nsContentIterator(); // nsIContentIterator interface methods ------------------------------ @@ -106,6 +105,7 @@ public: virtual nsresult PositionAt(nsINode* aCurNode); protected: + virtual ~nsContentIterator(); // Recursively get the deepest first/last child of aRoot. This will return // aRoot itself if it has no children. diff --git a/content/base/src/nsContentList.h b/content/base/src/nsContentList.h index a9509258158..1e2123e619b 100644 --- a/content/base/src/nsContentList.h +++ b/content/base/src/nsContentList.h @@ -42,7 +42,6 @@ public: { SetIsDOMBinding(); } - virtual ~nsBaseContentList(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -100,6 +99,8 @@ public: mElements.SetCapacity(aCapacity); } protected: + virtual ~nsBaseContentList(); + /** * To be called from non-destructor locations (e.g. unlink) that want to * remove from caches. Cacheable subclasses should override. diff --git a/content/base/src/nsContentPolicy.h b/content/base/src/nsContentPolicy.h index 405a45da4b2..a33747665b5 100644 --- a/content/base/src/nsContentPolicy.h +++ b/content/base/src/nsContentPolicy.h @@ -21,7 +21,10 @@ class nsContentPolicy : public nsIContentPolicy NS_DECL_NSICONTENTPOLICY nsContentPolicy(); + + protected: virtual ~nsContentPolicy(); + private: //Array of policies nsCategoryCache mPolicies; diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 5c2dd5218ab..05ee0bfc222 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -328,6 +328,8 @@ class DOMEventListenerManagersHashReporter MOZ_FINAL : public nsIMemoryReporter { MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf) + ~DOMEventListenerManagersHashReporter() {} + public: NS_DECL_ISUPPORTS @@ -392,6 +394,8 @@ EventListenerManagerHashClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry) class SameOriginChecker MOZ_FINAL : public nsIChannelEventSink, public nsIInterfaceRequestor { + ~SameOriginChecker() {} + NS_DECL_ISUPPORTS NS_DECL_NSICHANNELEVENTSINK NS_DECL_NSIINTERFACEREQUESTOR diff --git a/content/base/src/nsCrossSiteListenerProxy.cpp b/content/base/src/nsCrossSiteListenerProxy.cpp index 15c3a71932a..e3eb4cc9fa2 100644 --- a/content/base/src/nsCrossSiteListenerProxy.cpp +++ b/content/base/src/nsCrossSiteListenerProxy.cpp @@ -921,6 +921,8 @@ public: NS_DECL_NSICHANNELEVENTSINK private: + ~nsCORSPreflightListener() {} + void AddResultToCache(nsIRequest* aRequest); nsCOMPtr mOuterChannel; diff --git a/content/base/src/nsCrossSiteListenerProxy.h b/content/base/src/nsCrossSiteListenerProxy.h index 1fc34ef4d3e..c5bc6260d0e 100644 --- a/content/base/src/nsCrossSiteListenerProxy.h +++ b/content/base/src/nsCrossSiteListenerProxy.h @@ -62,6 +62,8 @@ public: nsresult Init(nsIChannel* aChannel, bool aAllowDataURI = false); private: + ~nsCORSListenerProxy() {} + nsresult UpdateChannel(nsIChannel* aChannel, bool aAllowDataURI = false); nsresult CheckRequestApproved(nsIRequest* aRequest); diff --git a/content/base/src/nsDOMAttributeMap.h b/content/base/src/nsDOMAttributeMap.h index 947cc92b5a4..e9d853d2639 100644 --- a/content/base/src/nsDOMAttributeMap.h +++ b/content/base/src/nsDOMAttributeMap.h @@ -90,7 +90,6 @@ public: typedef mozilla::ErrorResult ErrorResult; nsDOMAttributeMap(Element *aContent); - virtual ~nsDOMAttributeMap(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsDOMAttributeMap) @@ -177,6 +176,9 @@ public: size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; +protected: + virtual ~nsDOMAttributeMap(); + private: nsCOMPtr mContent; diff --git a/content/base/src/nsDOMFile.cpp b/content/base/src/nsDOMFile.cpp index c277ac97276..cb1e5179bb4 100644 --- a/content/base/src/nsDOMFile.cpp +++ b/content/base/src/nsDOMFile.cpp @@ -67,6 +67,8 @@ public: NS_FORWARD_NSIIPCSERIALIZABLEINPUTSTREAM(mSerializableInputStream->) private: + ~DataOwnerAdapter() {} + DataOwnerAdapter(DataOwner* aDataOwner, nsIInputStream* aStream) : mDataOwner(aDataOwner), mStream(aStream), @@ -638,6 +640,8 @@ MOZ_DEFINE_MALLOC_SIZE_OF(DOMMemoryFileDataOwnerMallocSizeOf) class nsDOMMemoryFileDataOwnerMemoryReporter MOZ_FINAL : public nsIMemoryReporter { + ~nsDOMMemoryFileDataOwnerMemoryReporter() {} + public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/content/base/src/nsDOMMutationObserver.h b/content/base/src/nsDOMMutationObserver.h index 132d328dc09..0020807b6e3 100644 --- a/content/base/src/nsDOMMutationObserver.h +++ b/content/base/src/nsDOMMutationObserver.h @@ -31,13 +31,14 @@ using mozilla::dom::MutationObservingInfo; class nsDOMMutationRecord : public nsISupports, public nsWrapperCache { + virtual ~nsDOMMutationRecord() {} + public: nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner) : mType(aType), mAttrNamespace(NullString()), mPrevValue(NullString()), mOwner(aOwner) { SetIsDOMBinding(); } - virtual ~nsDOMMutationRecord() {} nsISupports* GetParentObject() const { @@ -269,6 +270,9 @@ private: class nsMutationReceiver : public nsMutationReceiverBase { +protected: + virtual ~nsMutationReceiver() { Disconnect(false); } + public: nsMutationReceiver(nsINode* aTarget, nsDOMMutationObserver* aObserver); @@ -280,8 +284,6 @@ public: aParent->AddClone(this); } - virtual ~nsMutationReceiver() { Disconnect(false); } - nsMutationReceiver* GetParent() { return static_cast(mParent.get()); @@ -347,7 +349,6 @@ public: { SetIsDOMBinding(); } - virtual ~nsDOMMutationObserver(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMMutationObserver) NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_MUTATION_OBSERVER_IID) @@ -417,6 +418,8 @@ public: static void Shutdown(); protected: + virtual ~nsDOMMutationObserver(); + friend class nsMutationReceiver; friend class nsAutoMutationBatch; nsMutationReceiver* GetReceiverFor(nsINode* aNode, bool aMayCreate); diff --git a/content/base/src/nsDOMSerializer.h b/content/base/src/nsDOMSerializer.h index b540af6a6bd..ef58cad6460 100644 --- a/content/base/src/nsDOMSerializer.h +++ b/content/base/src/nsDOMSerializer.h @@ -19,7 +19,6 @@ class nsDOMSerializer MOZ_FINAL : public nsIDOMSerializer, { public: nsDOMSerializer(); - virtual ~nsDOMSerializer(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMSerializer) @@ -55,6 +54,8 @@ public: } private: + virtual ~nsDOMSerializer(); + nsDOMSerializer(nsISupports* aOwner) : mOwner(aOwner) { MOZ_ASSERT(aOwner); diff --git a/content/base/src/nsDataDocumentContentPolicy.h b/content/base/src/nsDataDocumentContentPolicy.h index c0930f6d234..224897e9c8e 100644 --- a/content/base/src/nsDataDocumentContentPolicy.h +++ b/content/base/src/nsDataDocumentContentPolicy.h @@ -24,14 +24,15 @@ class nsDataDocumentContentPolicy MOZ_FINAL : public nsIContentPolicy { + ~nsDataDocumentContentPolicy() + {} + public: NS_DECL_ISUPPORTS NS_DECL_NSICONTENTPOLICY nsDataDocumentContentPolicy() {} - ~nsDataDocumentContentPolicy() - {} }; diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 5a9d2d8f225..1076ddd26c8 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -5560,7 +5560,8 @@ namespace { class ProcessStackRunner MOZ_FINAL : public nsIRunnable { - public: + ~ProcessStackRunner() {} +public: ProcessStackRunner(bool aIsBaseQueue = false) : mIsBaseQueue(aIsBaseQueue) { @@ -9330,6 +9331,7 @@ namespace { * the CSSLoader's style cache */ class StubCSSLoaderObserver MOZ_FINAL : public nsICSSLoaderObserver { + ~StubCSSLoaderObserver() {} public: NS_IMETHOD StyleSheetLoaded(CSSStyleSheet*, bool, nsresult) diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index 4ed89f70d92..c6c8864fa19 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -394,9 +394,10 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Registry) Registry(); - virtual ~Registry(); protected: + virtual ~Registry(); + typedef nsClassHashtable DefinitionMap; @@ -538,6 +539,8 @@ protected: class PendingLoad : public ExternalResourceLoad, public nsIStreamListener { + ~PendingLoad() {} + public: PendingLoad(nsDocument* aDisplayDocument) : mDisplayDocument(aDisplayDocument) @@ -569,6 +572,7 @@ protected: class LoadgroupCallbacks MOZ_FINAL : public nsIInterfaceRequestor { + ~LoadgroupCallbacks() {} public: LoadgroupCallbacks(nsIInterfaceRequestor* aOtherCallbacks) : mCallbacks(aOtherCallbacks) @@ -591,6 +595,7 @@ protected: class _i##Shim MOZ_FINAL : public nsIInterfaceRequestor, \ public _i \ { \ + ~_i##Shim() {} \ public: \ _i##Shim(nsIInterfaceRequestor* aIfreq, _i* aRealPtr) \ : mIfReq(aIfreq), mRealPtr(aRealPtr) \ diff --git a/content/base/src/nsDocumentEncoder.cpp b/content/base/src/nsDocumentEncoder.cpp index 2e2854468a9..b7e927b7f59 100644 --- a/content/base/src/nsDocumentEncoder.cpp +++ b/content/base/src/nsDocumentEncoder.cpp @@ -66,13 +66,14 @@ class nsDocumentEncoder : public nsIDocumentEncoder { public: nsDocumentEncoder(); - virtual ~nsDocumentEncoder(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(nsDocumentEncoder) NS_DECL_NSIDOCUMENTENCODER protected: + virtual ~nsDocumentEncoder(); + void Initialize(bool aClearCachedSerializer = true); nsresult SerializeNodeStart(nsINode* aNode, int32_t aStartOffset, int32_t aEndOffset, nsAString& aStr, diff --git a/content/base/src/nsFormData.h b/content/base/src/nsFormData.h index 34f4e0d1233..c9178d77435 100644 --- a/content/base/src/nsFormData.h +++ b/content/base/src/nsFormData.h @@ -31,6 +31,8 @@ class nsFormData : public nsIDOMFormData, public nsFormSubmission, public nsWrapperCache { + ~nsFormData() {} + public: nsFormData(nsISupports* aOwner = nullptr); diff --git a/content/base/src/nsFrameLoader.h b/content/base/src/nsFrameLoader.h index ca5b26d90f1..08a05914573 100644 --- a/content/base/src/nsFrameLoader.h +++ b/content/base/src/nsFrameLoader.h @@ -137,6 +137,8 @@ public: nsFrameLoader* mFrameLoader; // WEAK private: + ~nsContentView() {} + nsresult Update(const ViewConfig& aConfig); ViewID mScrollId; @@ -158,9 +160,9 @@ class nsFrameLoader MOZ_FINAL : public nsIFrameLoader, protected: nsFrameLoader(mozilla::dom::Element* aOwner, bool aNetworkCreated); -public: ~nsFrameLoader(); +public: bool AsyncScrollEnabled() const { return !!(mRenderMode & RENDER_MODE_ASYNC_SCROLL); diff --git a/content/base/src/nsFrameMessageManager.cpp b/content/base/src/nsFrameMessageManager.cpp index 376edc59ce7..3fdba445090 100644 --- a/content/base/src/nsFrameMessageManager.cpp +++ b/content/base/src/nsFrameMessageManager.cpp @@ -1209,6 +1209,8 @@ namespace dom { class MessageManagerReporter MOZ_FINAL : public nsIMemoryReporter { + ~MessageManagerReporter() {} + public: NS_DECL_ISUPPORTS NS_DECL_NSIMEMORYREPORTER diff --git a/content/base/src/nsFrameMessageManager.h b/content/base/src/nsFrameMessageManager.h index 8919215f864..cb233ec05a9 100644 --- a/content/base/src/nsFrameMessageManager.h +++ b/content/base/src/nsFrameMessageManager.h @@ -184,6 +184,7 @@ public: } } +private: ~nsFrameMessageManager() { for (int32_t i = mChildManagers.Count(); i > 0; --i) { @@ -205,6 +206,7 @@ public: } } +public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsFrameMessageManager, nsIContentFrameMessageManager) @@ -410,6 +412,8 @@ protected: class nsScriptCacheCleaner MOZ_FINAL : public nsIObserver { + ~nsScriptCacheCleaner() {} + NS_DECL_ISUPPORTS nsScriptCacheCleaner() diff --git a/content/base/src/nsGenericDOMDataNode.h b/content/base/src/nsGenericDOMDataNode.h index ef43f7e22f0..f571750b383 100644 --- a/content/base/src/nsGenericDOMDataNode.h +++ b/content/base/src/nsGenericDOMDataNode.h @@ -66,7 +66,6 @@ public: nsGenericDOMDataNode(already_AddRefed& aNodeInfo); nsGenericDOMDataNode(already_AddRefed&& aNodeInfo); - virtual ~nsGenericDOMDataNode(); virtual void GetNodeValueInternal(nsAString& aNodeValue) MOZ_OVERRIDE; virtual void SetNodeValueInternal(const nsAString& aNodeValue, @@ -225,6 +224,8 @@ public: NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsGenericDOMDataNode) protected: + virtual ~nsGenericDOMDataNode(); + virtual mozilla::dom::Element* GetNameSpaceElement() { nsINode *parent = GetParentNode(); diff --git a/content/base/src/nsHostObjectProtocolHandler.cpp b/content/base/src/nsHostObjectProtocolHandler.cpp index fbaf9083a99..d6c8acdc8fc 100644 --- a/content/base/src/nsHostObjectProtocolHandler.cpp +++ b/content/base/src/nsHostObjectProtocolHandler.cpp @@ -33,6 +33,8 @@ namespace mozilla { class HostObjectURLsReporter MOZ_FINAL : public nsIMemoryReporter { + ~HostObjectURLsReporter() {} + public: NS_DECL_ISUPPORTS @@ -132,6 +134,8 @@ class BlobURLsReporter MOZ_FINAL : public nsIMemoryReporter } private: + ~BlobURLsReporter() {} + struct EnumArg { nsIHandleReportCallback* mCallback; nsISupports* mData; diff --git a/content/base/src/nsMixedContentBlocker.h b/content/base/src/nsMixedContentBlocker.h index 789783ec249..30385a61d99 100644 --- a/content/base/src/nsMixedContentBlocker.h +++ b/content/base/src/nsMixedContentBlocker.h @@ -26,12 +26,13 @@ enum MixedContentTypes { class nsMixedContentBlocker : public nsIContentPolicy { + virtual ~nsMixedContentBlocker(); + public: NS_DECL_ISUPPORTS NS_DECL_NSICONTENTPOLICY nsMixedContentBlocker(); - virtual ~nsMixedContentBlocker(); static bool sBlockMixedScript; static bool sBlockMixedDisplay; }; diff --git a/content/base/src/nsNoDataProtocolContentPolicy.h b/content/base/src/nsNoDataProtocolContentPolicy.h index 51a24fc504b..afe403963df 100644 --- a/content/base/src/nsNoDataProtocolContentPolicy.h +++ b/content/base/src/nsNoDataProtocolContentPolicy.h @@ -24,14 +24,15 @@ class nsNoDataProtocolContentPolicy MOZ_FINAL : public nsIContentPolicy { + ~nsNoDataProtocolContentPolicy() + {} + public: NS_DECL_ISUPPORTS NS_DECL_NSICONTENTPOLICY nsNoDataProtocolContentPolicy() {} - ~nsNoDataProtocolContentPolicy() - {} }; diff --git a/content/base/src/nsNodeInfoManager.h b/content/base/src/nsNodeInfoManager.h index ceb63142f67..3c05d77379b 100644 --- a/content/base/src/nsNodeInfoManager.h +++ b/content/base/src/nsNodeInfoManager.h @@ -34,9 +34,11 @@ class NodeInfo; class nsNodeInfoManager MOZ_FINAL { +private: + ~nsNodeInfoManager(); + public: nsNodeInfoManager(); - ~nsNodeInfoManager(); NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(nsNodeInfoManager) diff --git a/content/base/src/nsObjectLoadingContent.cpp b/content/base/src/nsObjectLoadingContent.cpp index aa9c6961654..e55b166266b 100644 --- a/content/base/src/nsObjectLoadingContent.cpp +++ b/content/base/src/nsObjectLoadingContent.cpp @@ -1159,6 +1159,7 @@ public: {} protected: + ~ObjectInterfaceRequestorShim() {} nsCOMPtr mContent; }; @@ -3520,6 +3521,10 @@ nsObjectLoadingContent::SetupProtoChainRunner::SetupProtoChainRunner( { } +nsObjectLoadingContent::SetupProtoChainRunner::~SetupProtoChainRunner() +{ +} + NS_IMETHODIMP nsObjectLoadingContent::SetupProtoChainRunner::Run() { diff --git a/content/base/src/nsObjectLoadingContent.h b/content/base/src/nsObjectLoadingContent.h index fd8910abcfd..255ef090386 100644 --- a/content/base/src/nsObjectLoadingContent.h +++ b/content/base/src/nsObjectLoadingContent.h @@ -473,6 +473,7 @@ class nsObjectLoadingContent : public nsImageLoadingContent // Helper class for SetupProtoChain class SetupProtoChainRunner MOZ_FINAL : public nsIRunnable { + ~SetupProtoChainRunner(); public: NS_DECL_ISUPPORTS diff --git a/content/base/src/nsPlainTextSerializer.h b/content/base/src/nsPlainTextSerializer.h index 6e961eec095..65ce863e4e2 100644 --- a/content/base/src/nsPlainTextSerializer.h +++ b/content/base/src/nsPlainTextSerializer.h @@ -34,7 +34,6 @@ class nsPlainTextSerializer : public nsIContentSerializer { public: nsPlainTextSerializer(); - virtual ~nsPlainTextSerializer(); NS_DECL_ISUPPORTS @@ -67,6 +66,8 @@ public: nsAString& aStr) MOZ_OVERRIDE; protected: + virtual ~nsPlainTextSerializer(); + nsresult GetAttributeValue(nsIAtom* aName, nsString& aValueRet); void AddToLine(const char16_t* aStringToAdd, int32_t aLength); void EndLine(bool softlinebreak, bool aBreakBySpace = false); diff --git a/content/base/src/nsRange.h b/content/base/src/nsRange.h index 5b89ee65179..b6eab38c094 100644 --- a/content/base/src/nsRange.h +++ b/content/base/src/nsRange.h @@ -38,6 +38,8 @@ class nsRange MOZ_FINAL : public nsIDOMRange, typedef mozilla::dom::DOMRect DOMRect; typedef mozilla::dom::DOMRectList DOMRectList; + virtual ~nsRange(); + public: nsRange(nsINode* aNode) : mRoot(nullptr) @@ -59,7 +61,6 @@ public: MOZ_ASSERT(aNode, "range isn't in a document!"); mOwner = aNode->OwnerDoc(); } - virtual ~nsRange(); static nsresult CreateRange(nsIDOMNode* aStartParent, int32_t aStartOffset, nsIDOMNode* aEndParent, int32_t aEndOffset, diff --git a/content/base/src/nsScriptLoader.cpp b/content/base/src/nsScriptLoader.cpp index 02ca15ddb2f..dee04ec45a5 100644 --- a/content/base/src/nsScriptLoader.cpp +++ b/content/base/src/nsScriptLoader.cpp @@ -69,6 +69,11 @@ using namespace mozilla::dom; ////////////////////////////////////////////////////////////// class nsScriptLoadRequest MOZ_FINAL : public nsISupports { + ~nsScriptLoadRequest() + { + js_free(mScriptTextBuf); + } + public: nsScriptLoadRequest(nsIScriptElement* aElement, uint32_t aVersion, @@ -85,11 +90,6 @@ public: { } - ~nsScriptLoadRequest() - { - js_free(mScriptTextBuf); - } - NS_DECL_THREADSAFE_ISUPPORTS void FireScriptAvailable(nsresult aResult) diff --git a/content/base/src/nsScriptLoader.h b/content/base/src/nsScriptLoader.h index 2aaca4ecc29..1f0b680da8c 100644 --- a/content/base/src/nsScriptLoader.h +++ b/content/base/src/nsScriptLoader.h @@ -55,7 +55,6 @@ class nsScriptLoader : public nsIStreamLoaderObserver public: nsScriptLoader(nsIDocument* aDocument); - virtual ~nsScriptLoader(); NS_DECL_ISUPPORTS NS_DECL_NSISTREAMLOADEROBSERVER @@ -245,6 +244,8 @@ public: void **aOffThreadToken); private: + virtual ~nsScriptLoader(); + /** * Unblocks the creator parser of the parser-blocking scripts. */ diff --git a/content/base/src/nsSyncLoadService.cpp b/content/base/src/nsSyncLoadService.cpp index 8aec1d2a764..3b8984b8f4c 100644 --- a/content/base/src/nsSyncLoadService.cpp +++ b/content/base/src/nsSyncLoadService.cpp @@ -37,7 +37,6 @@ class nsSyncLoader : public nsIStreamListener, { public: nsSyncLoader() : mLoading(false) {} - virtual ~nsSyncLoader(); NS_DECL_ISUPPORTS @@ -53,6 +52,8 @@ public: NS_DECL_NSIINTERFACEREQUESTOR private: + virtual ~nsSyncLoader(); + nsresult PushAsyncStream(nsIStreamListener* aListener); nsresult PushSyncStream(nsIStreamListener* aListener); @@ -64,9 +65,10 @@ private: class nsForceXMLListener : public nsIStreamListener { + virtual ~nsForceXMLListener(); + public: nsForceXMLListener(nsIStreamListener* aListener); - virtual ~nsForceXMLListener(); NS_DECL_ISUPPORTS NS_FORWARD_NSISTREAMLISTENER(mListener->) diff --git a/content/base/src/nsXMLContentSerializer.h b/content/base/src/nsXMLContentSerializer.h index 9e0eaf6780b..f643797e426 100644 --- a/content/base/src/nsXMLContentSerializer.h +++ b/content/base/src/nsXMLContentSerializer.h @@ -29,7 +29,6 @@ class nsINode; class nsXMLContentSerializer : public nsIContentSerializer { public: nsXMLContentSerializer(); - virtual ~nsXMLContentSerializer(); NS_DECL_ISUPPORTS @@ -68,6 +67,7 @@ class nsXMLContentSerializer : public nsIContentSerializer { nsAString& aStr) MOZ_OVERRIDE; protected: + virtual ~nsXMLContentSerializer(); /** * Appends a char16_t character and increments the column position diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 658efa0b1e7..61e9aa54be8 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -183,6 +183,8 @@ public: NS_DECL_NSIAUTHPROMPT XMLHttpRequestAuthPrompt(); + +protected: virtual ~XMLHttpRequestAuthPrompt(); }; @@ -3436,6 +3438,8 @@ public: } private: + ~AsyncVerifyRedirectCallbackForwarder() {} + nsRefPtr mXHR; }; diff --git a/content/base/src/nsXMLHttpRequest.h b/content/base/src/nsXMLHttpRequest.h index 5d7bf04fb74..faae2d47783 100644 --- a/content/base/src/nsXMLHttpRequest.h +++ b/content/base/src/nsXMLHttpRequest.h @@ -612,9 +612,10 @@ protected: NS_DECL_NSIHTTPHEADERVISITOR nsHeaderVisitor(nsXMLHttpRequest* aXMLHttpRequest, nsIHttpChannel* aHttpChannel) : mXHR(aXMLHttpRequest), mHttpChannel(aHttpChannel) {} - virtual ~nsHeaderVisitor() {} const nsACString &Headers() { return mHeaders; } private: + virtual ~nsHeaderVisitor() {} + nsCString mHeaders; nsXMLHttpRequest* mXHR; nsCOMPtr mHttpChannel; @@ -794,12 +795,14 @@ class nsXMLHttpRequestXPCOMifier MOZ_FINAL : public nsIStreamListener, { } +private: ~nsXMLHttpRequestXPCOMifier() { if (mXHR) { mXHR->mXPCOMifier = nullptr; } } +public: NS_FORWARD_NSISTREAMLISTENER(mXHR->) NS_FORWARD_NSIREQUESTOBSERVER(mXHR->) NS_FORWARD_NSICHANNELEVENTSINK(mXHR->) @@ -827,8 +830,9 @@ public: } nsXHRParseEndListener(nsIXMLHttpRequest* aXHR) : mXHR(do_GetWeakReference(aXHR)) {} - virtual ~nsXHRParseEndListener() {} private: + virtual ~nsXHRParseEndListener() {} + nsWeakPtr mXHR; }; diff --git a/content/html/content/src/HTMLBodyElement.h b/content/html/content/src/HTMLBodyElement.h index ac1e86d9eb9..a179097f69c 100644 --- a/content/html/content/src/HTMLBodyElement.h +++ b/content/html/content/src/HTMLBodyElement.h @@ -18,9 +18,10 @@ class HTMLBodyElement; class BodyRule: public nsIStyleRule { + virtual ~BodyRule(); + public: BodyRule(HTMLBodyElement* aPart); - virtual ~BodyRule(); NS_DECL_ISUPPORTS diff --git a/content/html/content/src/HTMLContentElement.h b/content/html/content/src/HTMLContentElement.h index 5cc4b83967a..2a8cf754ece 100644 --- a/content/html/content/src/HTMLContentElement.h +++ b/content/html/content/src/HTMLContentElement.h @@ -96,7 +96,6 @@ class DistributedContentList : public nsINodeList { public: DistributedContentList(HTMLContentElement* aHostElement); - virtual ~DistributedContentList(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(DistributedContentList) @@ -111,6 +110,7 @@ public: virtual uint32_t Length() const; virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: + virtual ~DistributedContentList(); nsRefPtr mParent; nsCOMArray mDistributedNodes; }; diff --git a/content/html/content/src/HTMLFormControlsCollection.h b/content/html/content/src/HTMLFormControlsCollection.h index 9a3929c6828..6a5b28b56d0 100644 --- a/content/html/content/src/HTMLFormControlsCollection.h +++ b/content/html/content/src/HTMLFormControlsCollection.h @@ -28,7 +28,6 @@ class HTMLFormControlsCollection : public nsIHTMLCollection { public: HTMLFormControlsCollection(HTMLFormElement* aForm); - virtual ~HTMLFormControlsCollection(); void DropFormReference(); @@ -83,6 +82,7 @@ public: using nsWrapperCache::GetWrapperPreserveColor; virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: + virtual ~HTMLFormControlsCollection(); virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE { return nsWrapperCache::GetWrapperPreserveColor(); diff --git a/content/html/content/src/HTMLInputElement.cpp b/content/html/content/src/HTMLInputElement.cpp index 87fa1847e26..202cd806ca4 100644 --- a/content/html/content/src/HTMLInputElement.cpp +++ b/content/html/content/src/HTMLInputElement.cpp @@ -252,6 +252,8 @@ class HTMLInputElementState MOZ_FINAL : public nsISupports {}; protected: + ~HTMLInputElementState() {} + nsString mValue; nsTArray > mFiles; bool mChecked; @@ -330,6 +332,8 @@ namespace { class DirPickerRecursiveFileEnumerator MOZ_FINAL : public nsISimpleEnumerator { + ~DirPickerRecursiveFileEnumerator() {} + public: NS_DECL_ISUPPORTS @@ -706,6 +710,8 @@ NS_IMPL_ISUPPORTS(HTMLInputElement::nsFilePickerShownCallback, class nsColorPickerShownCallback MOZ_FINAL : public nsIColorPickerShownCallback { + ~nsColorPickerShownCallback() {} + public: nsColorPickerShownCallback(HTMLInputElement* aInput, nsIColorPicker* aColorPicker) diff --git a/content/html/content/src/HTMLInputElement.h b/content/html/content/src/HTMLInputElement.h index 358f8369bba..6b0bf616447 100644 --- a/content/html/content/src/HTMLInputElement.h +++ b/content/html/content/src/HTMLInputElement.h @@ -40,6 +40,9 @@ class Date; class DirPickerFileListBuilderTask; class UploadLastDir MOZ_FINAL : public nsIObserver, public nsSupportsWeakReference { + + ~UploadLastDir() {} + public: NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER @@ -66,15 +69,15 @@ public: class ContentPrefCallback MOZ_FINAL : public nsIContentPrefCallback2 { - public: + virtual ~ContentPrefCallback() + { } + + public: ContentPrefCallback(nsIFilePicker* aFilePicker, nsIFilePickerShownCallback* aFpCallback) : mFilePicker(aFilePicker) , mFpCallback(aFpCallback) { } - virtual ~ContentPrefCallback() - { } - NS_DECL_ISUPPORTS NS_DECL_NSICONTENTPREFCALLBACK2 @@ -1364,12 +1367,12 @@ private: class nsFilePickerShownCallback : public nsIFilePickerShownCallback { - public: - nsFilePickerShownCallback(HTMLInputElement* aInput, - nsIFilePicker* aFilePicker); virtual ~nsFilePickerShownCallback() { } + public: + nsFilePickerShownCallback(HTMLInputElement* aInput, + nsIFilePicker* aFilePicker); NS_DECL_ISUPPORTS NS_IMETHOD Done(int16_t aResult) MOZ_OVERRIDE; diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp index 89aa82e68ff..3c32257a7c1 100644 --- a/content/html/content/src/HTMLMediaElement.cpp +++ b/content/html/content/src/HTMLMediaElement.cpp @@ -242,6 +242,8 @@ class HTMLMediaElement::MediaLoadListener MOZ_FINAL : public nsIStreamListener, public nsIInterfaceRequestor, public nsIObserver { + ~MediaLoadListener() {} + NS_DECL_ISUPPORTS NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSISTREAMLISTENER diff --git a/content/html/content/src/HTMLOptionsCollection.h b/content/html/content/src/HTMLOptionsCollection.h index 56fd98f7b0d..6125acc141c 100644 --- a/content/html/content/src/HTMLOptionsCollection.h +++ b/content/html/content/src/HTMLOptionsCollection.h @@ -36,7 +36,6 @@ class HTMLOptionsCollection : public nsIHTMLCollection typedef HTMLOptionElementOrHTMLOptGroupElement HTMLOptionOrOptGroupElement; public: HTMLOptionsCollection(HTMLSelectElement* aSelect); - virtual ~HTMLOptionsCollection(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -44,6 +43,8 @@ public: using nsWrapperCache::GetWrapperPreserveColor; virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: + virtual ~HTMLOptionsCollection(); + virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE { return nsWrapperCache::GetWrapperPreserveColor(); diff --git a/content/html/content/src/HTMLPropertiesCollection.h b/content/html/content/src/HTMLPropertiesCollection.h index e9ef10b61f3..36e55d536f9 100644 --- a/content/html/content/src/HTMLPropertiesCollection.h +++ b/content/html/content/src/HTMLPropertiesCollection.h @@ -54,12 +54,13 @@ class HTMLPropertiesCollection : public nsIHTMLCollection, friend class PropertyStringList; public: HTMLPropertiesCollection(nsGenericHTMLElement* aRoot); - virtual ~HTMLPropertiesCollection(); // nsWrapperCache using nsWrapperCache::GetWrapperPreserveColor; virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: + virtual ~HTMLPropertiesCollection(); + virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE { return nsWrapperCache::GetWrapperPreserveColor(); @@ -151,7 +152,6 @@ class PropertyNodeList : public nsINodeList, public: PropertyNodeList(HTMLPropertiesCollection* aCollection, nsIContent* aRoot, const nsAString& aName); - virtual ~PropertyNodeList(); virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE; @@ -190,6 +190,8 @@ public: void SetDirty() { mIsDirty = true; } protected: + virtual ~PropertyNodeList(); + // Make sure this list is up to date, in case the DOM has been mutated. void EnsureFresh(); diff --git a/content/html/content/src/HTMLSelectElement.h b/content/html/content/src/HTMLSelectElement.h index e22026acf0e..0c193eb4486 100644 --- a/content/html/content/src/HTMLSelectElement.h +++ b/content/html/content/src/HTMLSelectElement.h @@ -50,10 +50,6 @@ public: SelectState() { } - virtual ~SelectState() - { - } - NS_DECLARE_STATIC_IID_ACCESSOR(NS_SELECT_STATE_IID) NS_DECL_ISUPPORTS @@ -73,6 +69,10 @@ public: } private: + virtual ~SelectState() + { + } + nsCheapSet mValues; nsCheapSet mIndices; }; diff --git a/content/html/content/src/HTMLTableElement.cpp b/content/html/content/src/HTMLTableElement.cpp index e49835df7f1..c6808c8d64b 100644 --- a/content/html/content/src/HTMLTableElement.cpp +++ b/content/html/content/src/HTMLTableElement.cpp @@ -29,7 +29,6 @@ class TableRowsCollection : public nsIHTMLCollection, { public: TableRowsCollection(HTMLTableElement *aParent); - virtual ~TableRowsCollection(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSIDOMHTMLCOLLECTION @@ -53,6 +52,8 @@ public: using nsWrapperCache::GetWrapperPreserveColor; virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: + virtual ~TableRowsCollection(); + virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE { return nsWrapperCache::GetWrapperPreserveColor(); diff --git a/content/html/content/src/MediaError.h b/content/html/content/src/MediaError.h index ba6fb0208d1..d0f54ee9237 100644 --- a/content/html/content/src/MediaError.h +++ b/content/html/content/src/MediaError.h @@ -19,6 +19,8 @@ namespace dom { class MediaError MOZ_FINAL : public nsIDOMMediaError, public nsWrapperCache { + ~MediaError() {} + public: MediaError(HTMLMediaElement* aParent, uint16_t aCode); diff --git a/content/html/content/src/TextTrackManager.cpp b/content/html/content/src/TextTrackManager.cpp index 3e3d1955e5d..53104ae8c47 100644 --- a/content/html/content/src/TextTrackManager.cpp +++ b/content/html/content/src/TextTrackManager.cpp @@ -110,6 +110,10 @@ TextTrackManager::TextTrackManager(HTMLMediaElement *aMediaElement) } } +TextTrackManager::~TextTrackManager() +{ +} + TextTrackList* TextTrackManager::TextTracks() const { diff --git a/content/html/content/src/TextTrackManager.h b/content/html/content/src/TextTrackManager.h index 5f71e3bbcc5..67727395447 100644 --- a/content/html/content/src/TextTrackManager.h +++ b/content/html/content/src/TextTrackManager.h @@ -35,6 +35,8 @@ class TextTrackCue; class TextTrackManager MOZ_FINAL : public nsIDOMEventListener { + ~TextTrackManager(); + public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(TextTrackManager) diff --git a/content/html/content/src/TimeRanges.h b/content/html/content/src/TimeRanges.h index 2a5a7aba372..a5be5eb5caa 100644 --- a/content/html/content/src/TimeRanges.h +++ b/content/html/content/src/TimeRanges.h @@ -17,6 +17,18 @@ namespace mozilla { namespace dom { +class TimeRanges; + +} + +template<> +struct HasDangerousPublicDestructor +{ + static const bool value = true; +}; + +namespace dom { + // Implements media TimeRanges: // http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#timeranges class TimeRanges MOZ_FINAL : public nsIDOMTimeRanges diff --git a/content/html/content/src/UndoManager.cpp b/content/html/content/src/UndoManager.cpp index 8ca1f4af52b..24dc2838145 100644 --- a/content/html/content/src/UndoManager.cpp +++ b/content/html/content/src/UndoManager.cpp @@ -110,6 +110,8 @@ class UndoAttrChanged : public UndoTxn { UndoAttrChanged(mozilla::dom::Element* aElement, int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType); protected: + ~UndoAttrChanged() {} + nsresult SaveRedoState(); nsCOMPtr mElement; int32_t mNameSpaceID; @@ -218,6 +220,8 @@ class UndoTextChanged : public UndoTxn { UndoTextChanged(nsIContent* aContent, CharacterDataChangeInfo* aChange); protected: + ~UndoTextChanged() {} + void SaveRedoState(); nsCOMPtr mContent; UndoCharacterChangedData mChange; @@ -330,6 +334,7 @@ class UndoContentAppend : public UndoTxn { NS_IMETHOD UndoTransaction(); UndoContentAppend(nsIContent* aContent); protected: + ~UndoContentAppend() {} nsCOMPtr mContent; nsCOMArray mChildren; }; @@ -400,6 +405,7 @@ class UndoContentInsert : public UndoTxn { UndoContentInsert(nsIContent* aContent, nsIContent* aChild, int32_t aInsertIndex); protected: + ~UndoContentInsert() {} nsCOMPtr mContent; nsCOMPtr mChild; nsCOMPtr mNextNode; @@ -488,6 +494,7 @@ class UndoContentRemove : public UndoTxn { UndoContentRemove(nsIContent* aContent, nsIContent* aChild, int32_t aInsertIndex); protected: + ~UndoContentRemove() {} nsCOMPtr mContent; nsCOMPtr mChild; nsCOMPtr mNextNode; @@ -733,6 +740,7 @@ class FunctionCallTxn : public UndoTxn { NS_IMETHOD UndoTransaction(); FunctionCallTxn(DOMTransaction* aTransaction, uint32_t aFlags); protected: + ~FunctionCallTxn() {} /** * Call a function member on the transaction object with the * specified function name. diff --git a/content/html/content/src/ValidityState.h b/content/html/content/src/ValidityState.h index c4756ad6ed9..a74e8fb04e4 100644 --- a/content/html/content/src/ValidityState.h +++ b/content/html/content/src/ValidityState.h @@ -17,6 +17,8 @@ namespace dom { class ValidityState MOZ_FINAL : public nsIDOMValidityState, public nsWrapperCache { + ~ValidityState() {} + public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ValidityState) diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index ea3d5d19e6f..46b09fc0383 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -166,6 +166,10 @@ private: class nsGenericHTMLElementTearoff : public nsIDOMElementCSSInlineStyle { + virtual ~nsGenericHTMLElementTearoff() + { + } + NS_DECL_CYCLE_COLLECTING_ISUPPORTS nsGenericHTMLElementTearoff(nsGenericHTMLElement *aElement) @@ -173,10 +177,6 @@ class nsGenericHTMLElementTearoff : public nsIDOMElementCSSInlineStyle { } - virtual ~nsGenericHTMLElementTearoff() - { - } - NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) { NS_ADDREF(*aStyle = mElement->Style()); diff --git a/content/html/content/src/nsRadioVisitor.h b/content/html/content/src/nsRadioVisitor.h index ad0ee469b8d..bc8297181fd 100644 --- a/content/html/content/src/nsRadioVisitor.h +++ b/content/html/content/src/nsRadioVisitor.h @@ -17,9 +17,11 @@ class nsIFormControl; */ class nsRadioVisitor : public nsIRadioVisitor { +protected: + virtual ~nsRadioVisitor() { } + public: nsRadioVisitor() { } - virtual ~nsRadioVisitor() { } NS_DECL_ISUPPORTS diff --git a/content/html/content/src/nsTextEditorState.cpp b/content/html/content/src/nsTextEditorState.cpp index 70912d7d6f2..b02b3c4c85c 100644 --- a/content/html/content/src/nsTextEditorState.cpp +++ b/content/html/content/src/nsTextEditorState.cpp @@ -191,18 +191,20 @@ public: NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED private: + ~nsAnonDivObserver() {} nsTextEditorState* mTextEditorState; }; class nsTextInputSelectionImpl MOZ_FINAL : public nsSupportsWeakReference , public nsISelectionController { + ~nsTextInputSelectionImpl(){} + public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsTextInputSelectionImpl, nsISelectionController) nsTextInputSelectionImpl(nsFrameSelection *aSel, nsIPresShell *aShell, nsIContent *aLimiter); - ~nsTextInputSelectionImpl(){} void SetScrollableFrame(nsIScrollableFrame *aScrollableFrame); nsFrameSelection* GetConstFrameSelection() @@ -652,9 +654,6 @@ public: /** the default constructor */ explicit nsTextInputListener(nsITextControlElement* aTxtCtrlElement); - /** the default destructor. virtual due to the possibility of derivation. - */ - virtual ~nsTextInputListener(); /** SetEditor gives an address to the editor that will be accessed * @param aEditor the editor this listener calls for editing operations @@ -673,6 +672,9 @@ public: NS_DECL_NSIEDITOROBSERVER protected: + /** the default destructor. virtual due to the possibility of derivation. + */ + virtual ~nsTextInputListener(); nsresult UpdateTextInputCommands(const nsAString& commandsToUpdate); diff --git a/content/html/document/src/HTMLAllCollection.h b/content/html/document/src/HTMLAllCollection.h index 1464a504104..7720390b203 100644 --- a/content/html/document/src/HTMLAllCollection.h +++ b/content/html/document/src/HTMLAllCollection.h @@ -32,9 +32,10 @@ template struct Nullable; class HTMLAllCollection MOZ_FINAL : public nsISupports , public nsWrapperCache { + ~HTMLAllCollection(); + public: HTMLAllCollection(nsHTMLDocument* aDocument); - ~HTMLAllCollection(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(HTMLAllCollection) diff --git a/content/html/document/src/MediaDocument.h b/content/html/document/src/MediaDocument.h index 9ca6b63d73d..f67d774b0c4 100644 --- a/content/html/document/src/MediaDocument.h +++ b/content/html/document/src/MediaDocument.h @@ -80,9 +80,11 @@ private: class MediaDocumentStreamListener: public nsIStreamListener { +protected: + virtual ~MediaDocumentStreamListener(); + public: MediaDocumentStreamListener(MediaDocument *aDocument); - virtual ~MediaDocumentStreamListener(); void SetStreamListener(nsIStreamListener *aListener); NS_DECL_ISUPPORTS diff --git a/content/xml/document/src/nsXMLPrettyPrinter.h b/content/xml/document/src/nsXMLPrettyPrinter.h index 6e9a943b51e..0f1f2f23a8d 100644 --- a/content/xml/document/src/nsXMLPrettyPrinter.h +++ b/content/xml/document/src/nsXMLPrettyPrinter.h @@ -15,7 +15,6 @@ class nsXMLPrettyPrinter : public nsStubDocumentObserver { public: nsXMLPrettyPrinter(); - virtual ~nsXMLPrettyPrinter(); NS_DECL_ISUPPORTS @@ -41,6 +40,8 @@ public: */ void Unhook(); private: + virtual ~nsXMLPrettyPrinter(); + /** * Signals for unhooking by setting mUnhookPending if the node changed is * non-anonymous content. diff --git a/content/xul/content/src/nsXULContextMenuBuilder.h b/content/xul/content/src/nsXULContextMenuBuilder.h index de2ed9072e1..83e19cb99da 100644 --- a/content/xul/content/src/nsXULContextMenuBuilder.h +++ b/content/xul/content/src/nsXULContextMenuBuilder.h @@ -25,7 +25,6 @@ class nsXULContextMenuBuilder : public nsIMenuBuilder, { public: nsXULContextMenuBuilder(); - virtual ~nsXULContextMenuBuilder(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXULContextMenuBuilder, @@ -35,6 +34,8 @@ public: NS_DECL_NSIXULCONTEXTMENUBUILDER protected: + virtual ~nsXULContextMenuBuilder(); + nsresult CreateElement(nsIAtom* aTag, nsIDOMHTMLElement* aHTMLElement, mozilla::dom::Element** aResult); diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 038cda2c249..0a849254132 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -124,6 +124,8 @@ uint32_t nsXULPrototypeAttribute::gNumCacheFills; class nsXULElementTearoff MOZ_FINAL : public nsIDOMElementCSSInlineStyle, public nsIFrameLoaderOwner { + ~nsXULElementTearoff() {} + public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXULElementTearoff, diff --git a/content/xul/content/src/nsXULElement.h b/content/xul/content/src/nsXULElement.h index 39450ac16bd..ab26ece73c5 100644 --- a/content/xul/content/src/nsXULElement.h +++ b/content/xul/content/src/nsXULElement.h @@ -115,7 +115,6 @@ public: Type mType; - virtual ~nsXULPrototypeNode() {} virtual nsresult Serialize(nsIObjectOutputStream* aStream, nsXULPrototypeDocument* aProtoDoc, const nsTArray> *aNodeInfos) = 0; @@ -145,6 +144,7 @@ public: protected: nsXULPrototypeNode(Type aType) : mType(aType) {} + virtual ~nsXULPrototypeNode() {} }; class nsXULPrototypeElement : public nsXULPrototypeNode diff --git a/content/xul/content/src/nsXULPopupListener.h b/content/xul/content/src/nsXULPopupListener.h index d401d955491..4d1def96b9a 100644 --- a/content/xul/content/src/nsXULPopupListener.h +++ b/content/xul/content/src/nsXULPopupListener.h @@ -26,7 +26,6 @@ public: // aIsContext is true, the popup is a context menu which opens on a // context menu event. nsXULPopupListener(mozilla::dom::Element* aElement, bool aIsContext); - virtual ~nsXULPopupListener(void); // nsISupports NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -34,6 +33,8 @@ public: NS_DECL_NSIDOMEVENTLISTENER protected: + virtual ~nsXULPopupListener(void); + // open the popup. aEvent is the event that triggered the popup such as // a mouse click and aTargetContent is the target of this event. virtual nsresult LaunchPopup(nsIDOMEvent* aEvent, nsIContent* aTargetContent); diff --git a/content/xul/document/src/nsXULCommandDispatcher.h b/content/xul/document/src/nsXULCommandDispatcher.h index 8c41febd896..449e5d31892 100644 --- a/content/xul/document/src/nsXULCommandDispatcher.h +++ b/content/xul/document/src/nsXULCommandDispatcher.h @@ -28,7 +28,6 @@ class nsXULCommandDispatcher : public nsIDOMXULCommandDispatcher, { public: nsXULCommandDispatcher(nsIDocument* aDocument); - virtual ~nsXULCommandDispatcher(); // nsISupports NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -40,6 +39,8 @@ public: void Disconnect(); protected: + virtual ~nsXULCommandDispatcher(); + already_AddRefed GetWindowRoot(); nsIContent* GetRootFocusedContentAndWindow(nsPIDOMWindow** aWindow); diff --git a/content/xul/document/src/nsXULContentSink.h b/content/xul/document/src/nsXULContentSink.h index e166065a938..8c1c406d03d 100644 --- a/content/xul/document/src/nsXULContentSink.h +++ b/content/xul/document/src/nsXULContentSink.h @@ -27,7 +27,6 @@ class XULContentSinkImpl : public nsIXMLContentSink, { public: XULContentSinkImpl(); - virtual ~XULContentSinkImpl(); // nsISupports NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -54,6 +53,8 @@ public: nsresult Init(nsIDocument* aDocument, nsXULPrototypeDocument* aPrototype); protected: + virtual ~XULContentSinkImpl(); + // pseudo-constants char16_t* mText; int32_t mTextLength; diff --git a/content/xul/templates/src/nsRDFQuery.h b/content/xul/templates/src/nsRDFQuery.h index 6d186973d4c..3addbae1293 100644 --- a/content/xul/templates/src/nsRDFQuery.h +++ b/content/xul/templates/src/nsRDFQuery.h @@ -39,6 +39,8 @@ public: class nsRDFQuery MOZ_FINAL : public nsITemplateRDFQuery { + ~nsRDFQuery() { Finish(); } + public: nsRDFQuery(nsXULTemplateQueryProcessorRDF* aProcessor) @@ -48,8 +50,6 @@ public: mCachedResults(nullptr) { } - ~nsRDFQuery() { Finish(); } - NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(nsRDFQuery) diff --git a/content/xul/templates/src/nsXMLBinding.cpp b/content/xul/templates/src/nsXMLBinding.cpp index d78f3ff556b..9a6ab0fa3a6 100644 --- a/content/xul/templates/src/nsXMLBinding.cpp +++ b/content/xul/templates/src/nsXMLBinding.cpp @@ -37,6 +37,9 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsXMLBindingSet, AddRef) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsXMLBindingSet, Release) +nsXMLBindingSet::~nsXMLBindingSet() +{} + nsresult nsXMLBindingSet::AddBinding(nsIAtom* aVar, nsIDOMXPathExpression* aExpr) { diff --git a/content/xul/templates/src/nsXMLBinding.h b/content/xul/templates/src/nsXMLBinding.h index 9a2b0835787..d4e8c1886ac 100644 --- a/content/xul/templates/src/nsXMLBinding.h +++ b/content/xul/templates/src/nsXMLBinding.h @@ -50,6 +50,8 @@ struct nsXMLBinding { */ class nsXMLBindingSet MOZ_FINAL { + ~nsXMLBindingSet(); + public: // results hold a reference to a binding set in their diff --git a/content/xul/templates/src/nsXULTemplateBuilder.h b/content/xul/templates/src/nsXULTemplateBuilder.h index 9f3d839b98f..e5a717b1843 100644 --- a/content/xul/templates/src/nsXULTemplateBuilder.h +++ b/content/xul/templates/src/nsXULTemplateBuilder.h @@ -47,7 +47,6 @@ class nsXULTemplateBuilder : public nsIXULTemplateBuilder, public: nsXULTemplateBuilder(); - virtual ~nsXULTemplateBuilder(); nsresult InitGlobals(); @@ -334,6 +333,8 @@ public: nsIRDFResource** aResource); protected: + virtual ~nsXULTemplateBuilder(); + nsCOMPtr mDataSource; nsCOMPtr mDB; nsCOMPtr mCompDB; diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.h b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.h index 8662f5ac066..0a99d24fb04 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.h +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.h @@ -48,8 +48,6 @@ public: nsXULTemplateQueryProcessorRDF(); - ~nsXULTemplateQueryProcessorRDF(); - nsresult InitGlobals(); // nsISupports interface @@ -274,6 +272,8 @@ public: #endif protected: + ~nsXULTemplateQueryProcessorRDF(); + // We are an observer of the composite datasource. The cycle is // broken when the document is destroyed. nsCOMPtr mDB; diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.h b/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.h index 5cbdff03fbe..bd90af0716c 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.h +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.h @@ -28,6 +28,8 @@ private: nsCOMArray mColumnNames; + ~nsXULTemplateResultSetStorage() {} + public: // nsISupports interface @@ -58,6 +60,8 @@ public: private: + ~nsXULTemplateQueryProcessorStorage() {} + nsCOMPtr mStorageConnection; bool mGenerationStarted; }; diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorXML.h b/content/xul/templates/src/nsXULTemplateQueryProcessorXML.h index 1524cbca3e6..a83139bc6bb 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorXML.h +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorXML.h @@ -69,6 +69,8 @@ class nsXMLQuery MOZ_FINAL : public nsISupports { } protected: + ~nsXMLQuery() {} + nsXULTemplateQueryProcessorXML* mProcessor; nsCOMPtr mMemberVariable; @@ -96,6 +98,8 @@ private: // current position within the list of results uint32_t mPosition; + ~nsXULTemplateResultSetXML() {} + public: // nsISupports interface @@ -146,6 +150,8 @@ public: private: + ~nsXULTemplateQueryProcessorXML() {} + bool mGenerationStarted; nsRefPtrHashtable mRuleToBindingsMap; diff --git a/content/xul/templates/src/nsXULTemplateResultRDF.h b/content/xul/templates/src/nsXULTemplateResultRDF.h index 3f5a075b455..381541d0c9b 100644 --- a/content/xul/templates/src/nsXULTemplateResultRDF.h +++ b/content/xul/templates/src/nsXULTemplateResultRDF.h @@ -32,8 +32,6 @@ public: const Instantiation& aInst, nsIRDFResource* aNode); - ~nsXULTemplateResultRDF(); - nsITemplateRDFQuery* Query() { return mQuery; } nsXULTemplateQueryProcessorRDF* GetProcessor() @@ -65,6 +63,7 @@ public: HasMemoryElement(const MemoryElement& aMemoryElement); protected: + ~nsXULTemplateResultRDF(); // query that generated the result nsCOMPtr mQuery; diff --git a/content/xul/templates/src/nsXULTemplateResultSetRDF.h b/content/xul/templates/src/nsXULTemplateResultSetRDF.h index 43d5a7296e8..f41f4188965 100644 --- a/content/xul/templates/src/nsXULTemplateResultSetRDF.h +++ b/content/xul/templates/src/nsXULTemplateResultSetRDF.h @@ -33,6 +33,11 @@ private: bool mCheckedNext; + ~nsXULTemplateResultSetRDF() + { + delete mInstantiations; + } + public: // nsISupports interface @@ -50,11 +55,6 @@ public: mCurrent(nullptr), mCheckedNext(false) { } - - ~nsXULTemplateResultSetRDF() - { - delete mInstantiations; - } }; #endif // nsXULTemplateResultSetRDF_h__ diff --git a/content/xul/templates/src/nsXULTemplateResultStorage.cpp b/content/xul/templates/src/nsXULTemplateResultStorage.cpp index 11393be86bc..b840fc2c754 100644 --- a/content/xul/templates/src/nsXULTemplateResultStorage.cpp +++ b/content/xul/templates/src/nsXULTemplateResultStorage.cpp @@ -22,6 +22,10 @@ nsXULTemplateResultStorage::nsXULTemplateResultStorage(nsXULTemplateResultSetSto } } +nsXULTemplateResultStorage::~nsXULTemplateResultStorage() +{ +} + NS_IMETHODIMP nsXULTemplateResultStorage::GetIsContainer(bool* aIsContainer) { diff --git a/content/xul/templates/src/nsXULTemplateResultStorage.h b/content/xul/templates/src/nsXULTemplateResultStorage.h index 308c93b58ab..a811427880e 100644 --- a/content/xul/templates/src/nsXULTemplateResultStorage.h +++ b/content/xul/templates/src/nsXULTemplateResultStorage.h @@ -26,6 +26,8 @@ public: protected: + ~nsXULTemplateResultStorage(); + nsRefPtr mResultSet; nsCOMArray mValues; diff --git a/content/xul/templates/src/nsXULTemplateResultXML.h b/content/xul/templates/src/nsXULTemplateResultXML.h index f54985323f2..df7481b8dce 100644 --- a/content/xul/templates/src/nsXULTemplateResultXML.h +++ b/content/xul/templates/src/nsXULTemplateResultXML.h @@ -27,12 +27,12 @@ public: nsIDOMNode* aNode, nsXMLBindingSet* aBindings); - ~nsXULTemplateResultXML() {} - void GetNode(nsIDOMNode** aNode); protected: + ~nsXULTemplateResultXML() {} + // ID used for persisting data. It is constructed using the mNode's // base uri plus the node's id to form 'baseuri#id'. If the node has no // id, then an id of the form 'row' is generated. In the