Bug 1403178 - Remove mParent assertion from Performance* as it's triggered in headless mode r=baku
authorValentin Gosu <valentin.gosu@gmail.com>
Thu, 28 Sep 2017 08:26:11 +0200
changeset 383429 77229cfe153a7f5c417490baf14951efab5cda9a
parent 383428 813556d9e389f580d8e6efa9c24825edec952259
child 383430 c62e4471a0e31fde6ef570137e8648eb5612fbc8
push id32594
push userkwierso@gmail.com
push dateThu, 28 Sep 2017 22:49:33 +0000
treeherdermozilla-central@6dea0ee45b66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1403178
milestone58.0a1
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
Bug 1403178 - Remove mParent assertion from Performance* as it's triggered in headless mode r=baku MozReview-Commit-ID: BOz7e0oarab
dom/performance/PerformanceEntry.cpp
dom/performance/PerformanceEntry.h
dom/performance/PerformanceMark.cpp
dom/performance/PerformanceMeasure.cpp
--- a/dom/performance/PerformanceEntry.cpp
+++ b/dom/performance/PerformanceEntry.cpp
@@ -23,18 +23,16 @@ NS_INTERFACE_MAP_END
 
 PerformanceEntry::PerformanceEntry(nsISupports* aParent,
                                    const nsAString& aName,
                                    const nsAString& aEntryType)
 : mParent(aParent),
   mName(aName),
   mEntryType(aEntryType)
 {
-  // mParent is null in workers.
-  MOZ_ASSERT(mParent || !NS_IsMainThread());
 }
 
 PerformanceEntry::~PerformanceEntry()
 {
 }
 
 JSObject*
 PerformanceEntry::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
--- a/dom/performance/PerformanceEntry.h
+++ b/dom/performance/PerformanceEntry.h
@@ -84,16 +84,17 @@ public:
     return nullptr;
   }
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
 protected:
   virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
+private:
   nsCOMPtr<nsISupports> mParent;
   nsString mName;
   nsString mEntryType;
 };
 
 // Helper classes
 class MOZ_STACK_CLASS PerformanceEntryComparator final
 {
--- a/dom/performance/PerformanceMark.cpp
+++ b/dom/performance/PerformanceMark.cpp
@@ -11,18 +11,16 @@
 using namespace mozilla::dom;
 
 PerformanceMark::PerformanceMark(nsISupports* aParent,
                                  const nsAString& aName,
                                  DOMHighResTimeStamp aStartTime)
   : PerformanceEntry(aParent, aName, NS_LITERAL_STRING("mark"))
   , mStartTime(aStartTime)
 {
-  // mParent is null in workers.
-  MOZ_ASSERT(mParent || !NS_IsMainThread());
 }
 
 PerformanceMark::~PerformanceMark()
 {
 }
 
 JSObject*
 PerformanceMark::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
--- a/dom/performance/PerformanceMeasure.cpp
+++ b/dom/performance/PerformanceMeasure.cpp
@@ -13,18 +13,16 @@ using namespace mozilla::dom;
 PerformanceMeasure::PerformanceMeasure(nsISupports* aParent,
                                        const nsAString& aName,
                                        DOMHighResTimeStamp aStartTime,
                                        DOMHighResTimeStamp aEndTime)
 : PerformanceEntry(aParent, aName, NS_LITERAL_STRING("measure")),
   mStartTime(aStartTime),
   mDuration(aEndTime - aStartTime)
 {
-  // mParent is null in workers.
-  MOZ_ASSERT(mParent || !NS_IsMainThread());
 }
 
 PerformanceMeasure::~PerformanceMeasure()
 {
 }
 
 JSObject*
 PerformanceMeasure::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)