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

Side by Side Diff: third_party/WebKit/Source/platform/heap/PagePool.h

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: m_domTreeVersion initialization Created 3 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PagePool_h 5 #ifndef PagePool_h
6 #define PagePool_h 6 #define PagePool_h
7 7
8 #include "platform/heap/ThreadState.h" 8 #include "platform/heap/ThreadState.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/ThreadingPrimitives.h" 10 #include "wtf/ThreadingPrimitives.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 class OrphanedPagePool : public PagePool<BasePage> { 58 class OrphanedPagePool : public PagePool<BasePage> {
59 public: 59 public:
60 // The orphaned zap value must be zero in the lowest bits to allow for 60 // The orphaned zap value must be zero in the lowest bits to allow for
61 // using the mark bit when tracing. 61 // using the mark bit when tracing.
62 static const uint8_t orphanedZapValue = 0xdc; 62 static const uint8_t orphanedZapValue = 0xdc;
63 63
64 ~OrphanedPagePool(); 64 ~OrphanedPagePool();
65 void addOrphanedPage(int, BasePage*); 65 void addOrphanedPage(int, BasePage*);
66 void decommitOrphanedPages(); 66 void decommitOrphanedPages();
67 #if ENABLE(ASSERT) 67 #if DCHECK_IS_ON()
68 bool contains(void*); 68 bool contains(void*);
69 #endif 69 #endif
70 70
71 // For orphaned pages, we need to memset with ASan disabled, because 71 // For orphaned pages, we need to memset with ASan disabled, because
72 // the orphaned pages can still contain poisoned memory or annotated 72 // the orphaned pages can still contain poisoned memory or annotated
73 // container but we want to forcibly clear the orphaned pages without 73 // container but we want to forcibly clear the orphaned pages without
74 // causing ASan errors. asanDisabledMemset must not be used for 74 // causing ASan errors. asanDisabledMemset must not be used for
75 // non-orphaned pages. 75 // non-orphaned pages.
76 static void asanDisabledMemset(Address, char, size_t); 76 static void asanDisabledMemset(Address, char, size_t);
77 77
78 private: 78 private:
79 void clearMemory(PageMemory*); 79 void clearMemory(PageMemory*);
80 }; 80 };
81 81
82 } // namespace blink 82 } // namespace blink
83 83
84 #endif 84 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h ('k') | third_party/WebKit/Source/platform/heap/PagePool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698