Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D84807
This commit is contained in:
Simon Giesecke
2020-08-04 11:27:07 +00:00
parent 073b2c89a4
commit 1fbb2b245e
134 changed files with 331 additions and 406 deletions

View File

@@ -1480,8 +1480,7 @@ void nsCacheService::Lock(mozilla::Telemetry::HistogramID mainThreadLockerID) {
void nsCacheService::Unlock() {
gService->mLock.AssertCurrentThreadOwns();
nsTArray<nsISupports*> doomed;
doomed.SwapElements(gService->mDoomedObjects);
nsTArray<nsISupports*> doomed = std::move(gService->mDoomedObjects);
gService->LockReleased();
gService->mLock.Unlock();