| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 void* operator new(size_t size) | 863 void* operator new(size_t size) |
| 864 { | 864 { |
| 865 return Heap::allocate<T>(size); | 865 return Heap::allocate<T>(size); |
| 866 } | 866 } |
| 867 | 867 |
| 868 void operator delete(void* p) | 868 void operator delete(void* p) |
| 869 { | 869 { |
| 870 ASSERT_NOT_REACHED(); | 870 ASSERT_NOT_REACHED(); |
| 871 } | 871 } |
| 872 | 872 |
| 873 // FIXME: These methods are needed to make transition types compilable. | |
| 874 // Remove the methods once transition types are gone. | |
| 875 void ref() | |
| 876 { | |
| 877 ASSERT_NOT_REACHED(); | |
| 878 } | |
| 879 void deref() | |
| 880 { | |
| 881 ASSERT_NOT_REACHED(); | |
| 882 } | |
| 883 | |
| 884 protected: | 873 protected: |
| 885 GarbageCollected() | 874 GarbageCollected() |
| 886 { | 875 { |
| 887 ASSERT(ThreadStateFor<ThreadingTrait<T>::Affinity>::state()->contains(re
interpret_cast<Address>(this))); | 876 ASSERT(ThreadStateFor<ThreadingTrait<T>::Affinity>::state()->contains(re
interpret_cast<Address>(this))); |
| 888 } | 877 } |
| 889 ~GarbageCollected() { } | 878 ~GarbageCollected() { } |
| 890 }; | 879 }; |
| 891 | 880 |
| 892 // Base class for objects allocated in the Blink garbage-collected | 881 // Base class for objects allocated in the Blink garbage-collected |
| 893 // heap. | 882 // heap. |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 // to export. This forces it to export all the methods from ThreadHeap. | 1662 // to export. This forces it to export all the methods from ThreadHeap. |
| 1674 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 1663 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
| 1675 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 1664 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
| 1676 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 1665 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
| 1677 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; | 1666 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; |
| 1678 #endif | 1667 #endif |
| 1679 | 1668 |
| 1680 } | 1669 } |
| 1681 | 1670 |
| 1682 #endif // Heap_h | 1671 #endif // Heap_h |
| OLD | NEW |