| 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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 void operator delete(void* p) | 888 void operator delete(void* p) |
| 889 { | 889 { |
| 890 ASSERT_NOT_REACHED(); | 890 ASSERT_NOT_REACHED(); |
| 891 } | 891 } |
| 892 | 892 |
| 893 protected: | 893 protected: |
| 894 GarbageCollected() | 894 GarbageCollected() |
| 895 { | 895 { |
| 896 ASSERT(ThreadStateFor<ThreadingTrait<T>::Affinity>::state()->contains(re
interpret_cast<Address>(this))); | 896 ASSERT(ThreadStateFor<ThreadingTrait<T>::Affinity>::state()->contains(re
interpret_cast<Address>(this))); |
| 897 } | 897 } |
| 898 ~GarbageCollected() { } | |
| 899 }; | 898 }; |
| 900 | 899 |
| 901 // Base class for objects allocated in the Blink garbage-collected | 900 // Base class for objects allocated in the Blink garbage-collected |
| 902 // heap. | 901 // heap. |
| 903 // | 902 // |
| 904 // Defines a 'new' operator that allocates the memory in the | 903 // Defines a 'new' operator that allocates the memory in the |
| 905 // heap. 'delete' should not be called on objects that inherit from | 904 // heap. 'delete' should not be called on objects that inherit from |
| 906 // GarbageCollected. | 905 // GarbageCollected. |
| 907 // | 906 // |
| 908 // Instances of GarbageCollectedFinalized will have their destructor | 907 // Instances of GarbageCollectedFinalized will have their destructor |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 // to export. This forces it to export all the methods from ThreadHeap. | 1708 // to export. This forces it to export all the methods from ThreadHeap. |
| 1710 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 1709 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
| 1711 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 1710 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
| 1712 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 1711 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
| 1713 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; | 1712 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; |
| 1714 #endif | 1713 #endif |
| 1715 | 1714 |
| 1716 } | 1715 } |
| 1717 | 1716 |
| 1718 #endif // Heap_h | 1717 #endif // Heap_h |
| OLD | NEW |