Bug 1425458 - Resource timing entries Workers - part 5 - dispatch resourcetimingbufferfull on workers, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 24 Jan 2018 17:17:32 +0100
changeset 400756 08827b793aff9b41786d28e05fbd08d1328b5a95
parent 400755 4186a931f07c6a598db20122fdedf3e35539325d
child 400757 dfd991faa7cb6e3bcc1f9e48dbe5b547f96aba28
push id99218
push useramarchesini@mozilla.com
push dateThu, 25 Jan 2018 11:12:22 +0000
treeherdermozilla-inbound@4f292fa4e4a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1425458
milestone60.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 1425458 - Resource timing entries Workers - part 5 - dispatch resourcetimingbufferfull on workers, r=smaug
dom/performance/Performance.cpp
dom/performance/PerformanceWorker.h
--- a/dom/performance/Performance.cpp
+++ b/dom/performance/Performance.cpp
@@ -425,17 +425,17 @@ Performance::SetResourceTimingBufferSize
 {
   mResourceTimingBufferSize = aMaxSize;
 }
 
 void
 Performance::InsertResourceEntry(PerformanceEntry* aEntry)
 {
   MOZ_ASSERT(aEntry);
-  MOZ_ASSERT(mResourceEntries.Length() < mResourceTimingBufferSize);
+  MOZ_ASSERT(mResourceEntries.Length() <= mResourceTimingBufferSize);
 
   // We won't add an entry when 'privacy.resistFingerprint' is true.
   if (nsContentUtils::ShouldResistFingerprinting()) {
     return;
   }
 
   // Don't add the entry if the buffer is full
   if (mResourceEntries.Length() >= mResourceTimingBufferSize) {
--- a/dom/performance/PerformanceWorker.h
+++ b/dom/performance/PerformanceWorker.h
@@ -63,17 +63,17 @@ public:
 
 protected:
   ~PerformanceWorker();
 
   void InsertUserEntry(PerformanceEntry* aEntry) override;
 
   void DispatchBufferFullEvent() override
   {
-    MOZ_CRASH("This should not be called on workers.");
+    // Nothing to do here. See bug 1432758.
   }
 
 private:
   workers::WorkerPrivate* mWorkerPrivate;
 };
 
 } // namespace dom
 } // namespace mozilla