Backed out changeset 2811e4973556 (bug 1380081)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 11 Aug 2017 09:28:37 +0200
changeset 374266 718448f617c45649e07e44c9d5d6cd95cf2d72f3
parent 374265 ef7efc0cd92a05231760aff15c546e97cfd0925f
child 374267 36c4ddeb51a14c5e4046376dd22501fa22d9889f
push id32318
push userkwierso@gmail.com
push dateFri, 11 Aug 2017 20:16:01 +0000
treeherdermozilla-central@80ff3f300e05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1380081
milestone57.0a1
backs out2811e49735568ceb37dd11bcc83fce1ca0a06bbf
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 2811e4973556 (bug 1380081)
xpcom/threads/HangAnnotations.cpp
xpcom/threads/HangAnnotations.h
--- a/xpcom/threads/HangAnnotations.cpp
+++ b/xpcom/threads/HangAnnotations.cpp
@@ -28,17 +28,16 @@ public:
 
   void AddAnnotation(const nsAString& aName, const int32_t aData) override;
   void AddAnnotation(const nsAString& aName, const double aData) override;
   void AddAnnotation(const nsAString& aName, const nsAString& aData) override;
   void AddAnnotation(const nsAString& aName, const nsACString& aData) override;
   void AddAnnotation(const nsAString& aName, const bool aData) override;
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
-  size_t Count() const override;
   bool IsEmpty() const override;
   UniquePtr<Enumerator> GetEnumerator() override;
 
   typedef std::pair<nsString, nsString> AnnotationType;
   typedef std::vector<AnnotationType> VectorType;
   typedef VectorType::const_iterator IteratorType;
 
 private:
@@ -138,22 +137,16 @@ ChromeHangAnnotationEnumerator::Next(nsA
     return false;
   }
   aOutName = mIterator->first;
   aOutValue = mIterator->second;
   ++mIterator;
   return true;
 }
 
-size_t
-BrowserHangAnnotations::Count() const
-{
-  return mAnnotations.size();
-}
-
 bool
 BrowserHangAnnotations::IsEmpty() const
 {
   return mAnnotations.empty();
 }
 
 size_t
 BrowserHangAnnotations::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
@@ -261,16 +254,10 @@ UniquePtr<HangAnnotations>
 ChromeHangAnnotatorCallout()
 {
   if (!gChromehangAnnotators) {
     return nullptr;
   }
   return gChromehangAnnotators->GatherAnnotations();
 }
 
-UniquePtr<HangAnnotations>
-CreateEmptyHangAnnotations()
-{
-  return MakeUnique<BrowserHangAnnotations>();
-}
-
 } // namespace HangMonitor
 } // namespace mozilla
--- a/xpcom/threads/HangAnnotations.h
+++ b/xpcom/threads/HangAnnotations.h
@@ -36,17 +36,16 @@ public:
   class Enumerator
   {
   public:
     virtual ~Enumerator() {}
     virtual bool Next(nsAString& aOutName, nsAString& aOutValue) = 0;
   };
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
-  virtual size_t Count() const = 0;
   virtual bool IsEmpty() const = 0;
   virtual UniquePtr<Enumerator> GetEnumerator() = 0;
 };
 
 typedef UniquePtr<HangAnnotations> HangAnnotationsPtr;
 typedef Vector<HangAnnotationsPtr> HangAnnotationsVector;
 
 class Annotator
@@ -74,21 +73,16 @@ void RegisterAnnotator(Annotator& aAnnot
 void UnregisterAnnotator(Annotator& aAnnotator);
 
 /**
  * Gathers annotations. This function should be called by ChromeHangs.
  * @return UniquePtr to HangAnnotations object or nullptr if none.
  */
 HangAnnotationsPtr ChromeHangAnnotatorCallout();
 
-/**
- * Creates an empty UniquePtr<HangAnnotations>.
- */
-HangAnnotationsPtr CreateEmptyHangAnnotations();
-
 namespace Observer {
 
 class Annotators
 {
 public:
   Annotators();
   ~Annotators();