Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj

Differential Revision: https://phabricator.services.mozilla.com/D78027
This commit is contained in:
Simon Giesecke
2020-06-10 10:46:14 +00:00
parent c9868cda57
commit 00eddcee05
44 changed files with 99 additions and 176 deletions

View File

@@ -981,10 +981,7 @@ bool ServoStyleSet::EnsureUniqueInnerOnCSSSheets() {
});
while (!queue.IsEmpty()) {
uint32_t idx = queue.Length() - 1;
auto* sheet = queue[idx].first;
SheetOwner owner = queue[idx].second;
queue.RemoveElementAt(idx);
auto [sheet, owner] = queue.PopLastElement();
// Only call EnsureUniqueInner for complete sheets. If we do call it on
// incomplete sheets, we'll cause problems when the sheet is actually