@@ -104,8 +104,7 @@ nsresult ImageTracker::SetLockingState(bool aLocked) {
104104 if (mLocking == aLocked) return NS_OK;
105105
106106 // Otherwise, iterate over our images and perform the appropriate action.
107- for (const auto & entry : mImages ) {
108- imgIRequest* image = entry.GetKey ();
107+ for (imgIRequest* image : mImages .Keys ()) {
109108 if (aLocked) {
110109 image->LockImage ();
111110 } else {
@@ -124,8 +123,7 @@ void ImageTracker::SetAnimatingState(bool aAnimating) {
124123 if (mAnimating == aAnimating) return ;
125124
126125 // Otherwise, iterate over our images and perform the appropriate action.
127- for (const auto & entry : mImages ) {
128- imgIRequest* image = entry.GetKey ();
126+ for (imgIRequest* image : mImages .Keys ()) {
129127 if (aAnimating) {
130128 image->IncrementAnimationConsumers ();
131129 } else {
@@ -138,8 +136,8 @@ void ImageTracker::SetAnimatingState(bool aAnimating) {
138136}
139137
140138void ImageTracker::RequestDiscardAll () {
141- for (const auto & entry : mImages ) {
142- entry. GetKey () ->RequestDiscard ();
139+ for (imgIRequest* image : mImages . Keys () ) {
140+ image ->RequestDiscard ();
143141 }
144142}
145143
@@ -153,8 +151,7 @@ void ImageTracker::MediaFeatureValuesChangedAllDocuments(
153151 // Pull the images out into an array and iterate over them, in case the
154152 // image notifications do something that ends up modifying the table.
155153 nsTArray<nsCOMPtr<imgIContainer>> images;
156- for (const auto & entry : mImages ) {
157- imgIRequest* req = entry.GetKey ();
154+ for (imgIRequest* req : mImages .Keys ()) {
158155 nsCOMPtr<imgIContainer> image;
159156 req->GetImage (getter_AddRefs (image));
160157 if (!image) {
0 commit comments