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

Unified Diff: third_party/WebKit/Source/wtf/HashCountedSet.h

Issue 2725813002: (CANCELED) Forbid GC during copyToVector() (Closed)
Patch Set: Created 3 years, 10 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 | third_party/WebKit/Source/wtf/HashSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/HashCountedSet.h
diff --git a/third_party/WebKit/Source/wtf/HashCountedSet.h b/third_party/WebKit/Source/wtf/HashCountedSet.h
index 6d99b5fc71aca86cf385f7f8bcf21c2210367a29..dd23575a468ccb0a051a0424e50845f24cda2750 100644
--- a/third_party/WebKit/Source/wtf/HashCountedSet.h
+++ b/third_party/WebKit/Source/wtf/HashCountedSet.h
@@ -162,11 +162,10 @@ template <typename Value,
inline void copyToVector(
const HashCountedSet<Value, HashFunctions, Traits, Allocator>& collection,
VectorType& vector) {
- {
- // Disallow GC across resize allocation, see crbug.com/568173
- typename VectorType::GCForbiddenScope scope;
- vector.resize(collection.size());
- }
+ // Disallow GC across resize and iterations, see crbug.com/568173
+ typename VectorType::GCForbiddenScope scope;
+
+ vector.resize(collection.size());
auto it = collection.begin();
auto end = collection.end();
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/HashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698