Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp

Issue 2250883003: Use copyToVector in ScopedPageLoadDeferrer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp
diff --git a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp
index bedf6765e1a1a15cde093789c0e290078ce79a03..86576aad5ce6935e544caa0db0812559899d9e53 100644
--- a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp
+++ b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp
@@ -40,8 +40,7 @@ void setDefersLoading(bool isDeferred)
// Make a copy of the collection. Undeferring loads can cause script to run,
// which would mutate ordinaryPages() in the middle of iteration.
HeapVector<Member<Page>> pages;
- for (const auto& page : Page::ordinaryPages())
- pages.append(page);
+ copyToVector(Page::ordinaryPages(), pages);
for (const auto& page : pages)
page->setDefersLoading(isDeferred);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698