Bug 1425458 - Resource timing entries Workers - part 5 - dispatch resourcetimingbufferfull on workers, r=smaug
☠☠ backed out by e0c276b06c0d ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 24 Jan 2018 17:17:32 +0100
changeset 400590 7034af4332e478f94032966adf632b9330294544
parent 400589 f70500179140ad57dbfc616c15c781b705126a92
child 400591 af56400233d927cc01d9b5fc53de09365bf323aa
push id99191
push useramarchesini@mozilla.com
push dateWed, 24 Jan 2018 16:18:05 +0000
treeherdermozilla-inbound@b96d58fd945c [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