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

Side by Side Diff: Source/heap/Heap.h

Issue 169293002: Oilpan: Remove GC_INFO_{DEFINE,DECLARE} macros (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/heap/Visitor.h » ('j') | Source/heap/Visitor.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 // destructor is called on an instance when the garbage collector 853 // destructor is called on an instance when the garbage collector
854 // determines that it is no longer reachable. 854 // determines that it is no longer reachable.
855 template<typename T> 855 template<typename T>
856 class GarbageCollected { 856 class GarbageCollected {
857 WTF_MAKE_NONCOPYABLE(GarbageCollected); 857 WTF_MAKE_NONCOPYABLE(GarbageCollected);
858 858
859 // For now direct allocation of arrays on the heap is not allowed. 859 // For now direct allocation of arrays on the heap is not allowed.
860 void* operator new[](size_t size); 860 void* operator new[](size_t size);
861 void operator delete[](void* p); 861 void operator delete[](void* p);
862 public: 862 public:
863 typedef T GarbageCollectedBase;
864
863 void* operator new(size_t size) 865 void* operator new(size_t size)
864 { 866 {
865 return Heap::allocate<T>(size); 867 return Heap::allocate<T>(size);
866 } 868 }
867 869
868 void operator delete(void* p) 870 void operator delete(void* p)
869 { 871 {
870 ASSERT_NOT_REACHED(); 872 ASSERT_NOT_REACHED();
871 } 873 }
872 874
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 // to export. This forces it to export all the methods from ThreadHeap. 1670 // to export. This forces it to export all the methods from ThreadHeap.
1669 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf o*); 1671 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf o*);
1670 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); 1672 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*);
1671 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; 1673 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>;
1672 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; 1674 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>;
1673 #endif 1675 #endif
1674 1676
1675 } 1677 }
1676 1678
1677 #endif // Heap_h 1679 #endif // Heap_h
OLDNEW
« no previous file with comments | « no previous file | Source/heap/Visitor.h » ('j') | Source/heap/Visitor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698