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

Unified Diff: third_party/WebKit/Source/wtf/HashSet.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 | « third_party/WebKit/Source/wtf/HashCountedSet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/HashSet.h
diff --git a/third_party/WebKit/Source/wtf/HashSet.h b/third_party/WebKit/Source/wtf/HashSet.h
index 2f3644d3d526eaa6f6389e20590303359fa51f7c..6cb53829b778d01fe9549d029cd629f43f60da6e 100644
--- a/third_party/WebKit/Source/wtf/HashSet.h
+++ b/third_party/WebKit/Source/wtf/HashSet.h
@@ -311,11 +311,10 @@ template <typename C, typename W>
inline void copyToVector(const C& collection, W& vector) {
typedef typename C::const_iterator iterator;
- {
- // Disallow GC across resize allocation, see crbug.com/568173
- typename W::GCForbiddenScope scope;
- vector.resize(collection.size());
- }
+ // Disallow GC across resize and iterations, see crbug.com/568173
+ typename W::GCForbiddenScope scope;
+
+ vector.resize(collection.size());
iterator it = collection.begin();
iterator end = collection.end();
« no previous file with comments | « third_party/WebKit/Source/wtf/HashCountedSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698