| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 typename ValueArg, | 621 typename ValueArg, |
| 622 typename HashFunctions = typename DefaultHash<ValueArg>::Hash, | 622 typename HashFunctions = typename DefaultHash<ValueArg>::Hash, |
| 623 typename Traits = HashTraits<ValueArg>> | 623 typename Traits = HashTraits<ValueArg>> |
| 624 class PersistentHeapHashCountedSet : public PersistentHeapCollectionBase<HeapHas
hCountedSet<ValueArg, HashFunctions, Traits>> { }; | 624 class PersistentHeapHashCountedSet : public PersistentHeapCollectionBase<HeapHas
hCountedSet<ValueArg, HashFunctions, Traits>> { }; |
| 625 | 625 |
| 626 template<typename T, size_t inlineCapacity = 0> | 626 template<typename T, size_t inlineCapacity = 0> |
| 627 class PersistentHeapVector : public PersistentHeapCollectionBase<HeapVector<T, i
nlineCapacity>> { | 627 class PersistentHeapVector : public PersistentHeapCollectionBase<HeapVector<T, i
nlineCapacity>> { |
| 628 public: | 628 public: |
| 629 PersistentHeapVector() { } | 629 PersistentHeapVector() { } |
| 630 | 630 |
| 631 explicit PersistentHeapVector(size_t size) |
| 632 : PersistentHeapCollectionBase<HeapVector<T, inlineCapacity>>(size) |
| 633 { |
| 634 } |
| 635 |
| 631 template<size_t otherCapacity> | 636 template<size_t otherCapacity> |
| 632 PersistentHeapVector(const HeapVector<T, otherCapacity>& other) | 637 PersistentHeapVector(const HeapVector<T, otherCapacity>& other) |
| 633 : PersistentHeapCollectionBase<HeapVector<T, inlineCapacity>>(other) | 638 : PersistentHeapCollectionBase<HeapVector<T, inlineCapacity>>(other) |
| 634 { | 639 { |
| 635 } | 640 } |
| 636 }; | 641 }; |
| 637 | 642 |
| 638 template<typename T, size_t inlineCapacity = 0> | 643 template<typename T, size_t inlineCapacity = 0> |
| 639 class PersistentHeapDeque : public PersistentHeapCollectionBase<HeapDeque<T, inl
ineCapacity>> { | 644 class PersistentHeapDeque : public PersistentHeapCollectionBase<HeapDeque<T, inl
ineCapacity>> { |
| 640 public: | 645 public: |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C
rossThread)WeakPersistent. | 1496 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C
rossThread)WeakPersistent. |
| 1492 static T* unwrap(const StorageType& value) { return value.get(); } | 1497 static T* unwrap(const StorageType& value) { return value.get(); } |
| 1493 }; | 1498 }; |
| 1494 | 1499 |
| 1495 template<typename T> | 1500 template<typename T> |
| 1496 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1501 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 1497 | 1502 |
| 1498 } // namespace WTF | 1503 } // namespace WTF |
| 1499 | 1504 |
| 1500 #endif | 1505 #endif |
| OLD | NEW |