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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 void operator delete(void* p) | 869 void operator delete(void* p) |
870 { | 870 { |
871 ASSERT_NOT_REACHED(); | 871 ASSERT_NOT_REACHED(); |
872 } | 872 } |
873 | 873 |
874 protected: | 874 protected: |
875 GarbageCollected() | 875 GarbageCollected() |
876 { | 876 { |
877 ASSERT(ThreadStateFor<ThreadingTrait<T>::Affinity>::state()->contains(re
interpret_cast<Address>(this))); | 877 ASSERT(ThreadStateFor<ThreadingTrait<T>::Affinity>::state()->contains(re
interpret_cast<Address>(this))); |
878 } | 878 } |
879 ~GarbageCollected() { } | |
880 }; | 879 }; |
881 | 880 |
882 // Base class for objects allocated in the Blink garbage-collected | 881 // Base class for objects allocated in the Blink garbage-collected |
883 // heap. | 882 // heap. |
884 // | 883 // |
885 // Defines a 'new' operator that allocates the memory in the | 884 // Defines a 'new' operator that allocates the memory in the |
886 // heap. 'delete' should not be called on objects that inherit from | 885 // heap. 'delete' should not be called on objects that inherit from |
887 // GarbageCollected. | 886 // GarbageCollected. |
888 // | 887 // |
889 // Instances of GarbageCollectedFinalized will have their destructor | 888 // Instances of GarbageCollectedFinalized will have their destructor |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 // to export. This forces it to export all the methods from ThreadHeap. | 1689 // to export. This forces it to export all the methods from ThreadHeap. |
1691 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 1690 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
1692 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 1691 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
1693 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 1692 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
1694 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; | 1693 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; |
1695 #endif | 1694 #endif |
1696 | 1695 |
1697 } | 1696 } |
1698 | 1697 |
1699 #endif // Heap_h | 1698 #endif // Heap_h |
OLD | NEW |