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

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapAllocator.h

Issue 2250353002: Introduce copyToVector for HeapHashCountedSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-some-hash-counted-set-copy-to-vector
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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef HeapAllocator_h 5 #ifndef HeapAllocator_h
6 #define HeapAllocator_h 6 #define HeapAllocator_h
7 7
8 #include "platform/heap/Heap.h" 8 #include "platform/heap/Heap.h"
9 #include "platform/heap/Persistent.h" 9 #include "platform/heap/Persistent.h"
10 #include "platform/heap/TraceTraits.h" 10 #include "platform/heap/TraceTraits.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 template<typename U> 596 template<typename U>
597 static void store(const U& value, H& storage) { storage = value; } 597 static void store(const U& value, H& storage) { storage = value; }
598 598
599 static PeekOutType peek(const H& value) { return value; } 599 static PeekOutType peek(const H& value) { return value; }
600 }; 600 };
601 601
602 template<typename T> struct HashTraits<blink::Persistent<T>> : HandleHashTraits< T, blink::Persistent<T>> { }; 602 template<typename T> struct HashTraits<blink::Persistent<T>> : HandleHashTraits< T, blink::Persistent<T>> { };
603 603
604 template<typename T> struct HashTraits<blink::CrossThreadPersistent<T>> : Handle HashTraits<T, blink::CrossThreadPersistent<T>> { }; 604 template<typename T> struct HashTraits<blink::CrossThreadPersistent<T>> : Handle HashTraits<T, blink::CrossThreadPersistent<T>> { };
605 605
606 template <typename Value, typename HashFunctions, typename Traits, typename Vect orType>
607 inline void copyToVector(const blink::HeapHashCountedSet<Value, HashFunctions, T raits>& set, VectorType& vector)
608 {
609 copyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits, blink::HeapAllocator>&>(set), vector);
610 }
611
606 } // namespace WTF 612 } // namespace WTF
607 613
608 #endif 614 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698