Bug 689301 - Compile error in nsTimerImpl.cpp with gcc 4.6.0 on Fedora core 15 x64; r=espindola a=LegNeato
authorAditya Bhatt <aditya@adityabhatt.org>
Tue, 27 Sep 2011 17:11:03 -0400
changeset 79033 79eab065f0d05710733e577dc7b715c0540ea2b1
parent 79032 485f3c637b11ad07d4fdf48eacc6092385bcfbfc
child 79034 4de13b66499d7f29d3a105d6413bd777afa2624d
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersespindola, LegNeato
bugs689301
milestone9.0a2
Bug 689301 - Compile error in nsTimerImpl.cpp with gcc 4.6.0 on Fedora core 15 x64; r=espindola a=LegNeato
xpcom/glue/nsCOMPtr.h
--- a/xpcom/glue/nsCOMPtr.h
+++ b/xpcom/glue/nsCOMPtr.h
@@ -440,16 +440,24 @@ nsCOMPtr_base
             on a |nsCOMPtr|.  DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE.
 
             See |nsCOMPtr::operator->| and |nsRefPtr::operator->|.
           */
         {
           private:
             using T::AddRef;
             using T::Release;
+            
+            ~nsDerivedSafe(); // NOT TO BE IMPLEMENTED
+            /* 
+              This dtor is added to make this class compatible with GCC 4.6.
+              If the destructor for T is private, nsDerivedSafe's unimplemented destructor 
+              will be implicitly-declared by the compiler as deleted.
+              Therefore this explicit dtor exists to avoid that deletion. See bug 689301.
+            */
 
           protected:
             nsDerivedSafe(); // NOT TO BE IMPLEMENTED
               /*
                 This ctor exists to avoid compile errors and warnings about nsDerivedSafe using the
                 default ctor but inheriting classes without an empty ctor.  See bug 209667.
               */
         };