Bug 1367981 - Use AutoTArray instead of nsCOMArray in Tick(). r=smaug
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Fri, 26 May 2017 16:22:34 +0900
changeset 361193 6597f70ef534751b2056c14a2776ec9fa5122421
parent 361192 07778bb17a4a70341c91b91edcab5bf4f992607e
child 361194 6feb3ac7548f4dd47f3f09ca1f9c144000628622
push id90813
push usercbook@mozilla.com
push dateTue, 30 May 2017 09:53:44 +0000
treeherdermozilla-inbound@b5c3bb245c4e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1367981
milestone55.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 1367981 - Use AutoTArray instead of nsCOMArray in Tick(). r=smaug MozReview-Commit-ID: 48baDUvkTMc
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1890,19 +1890,19 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
   // Update any popups that may need to be moved or hidden due to their
   // anchor changing.
   nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
   if (pm) {
     pm->UpdatePopupPositions(this);
   }
 #endif
 
-  nsCOMArray<nsIDocument> documents;
+  AutoTArray<nsCOMPtr<nsIDocument>, 32> documents;
   CollectDocuments(mPresContext->Document(), &documents);
-  for (int32_t i = 0; i < documents.Count(); ++i) {
+  for (uint32_t i = 0; i < documents.Length(); ++i) {
     nsIDocument* doc = documents[i];
     doc->UpdateIntersectionObservations();
     doc->ScheduleIntersectionObserverNotification();
   }
 
   /*
    * Perform notification to imgIRequests subscribed to listen
    * for refresh events.