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

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

Issue 2054673002: Mark shouldMarkObject(), arenaForNormalPage() accessors as const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 InlinedGlobalMarkingVisitor_h 5 #ifndef InlinedGlobalMarkingVisitor_h
6 #define InlinedGlobalMarkingVisitor_h 6 #define InlinedGlobalMarkingVisitor_h
7 7
8 #include "platform/heap/MarkingVisitorImpl.h" 8 #include "platform/heap/MarkingVisitorImpl.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 29 matching lines...) Expand all
40 40
41 template<typename T, void (T::*method)(Visitor*)> 41 template<typename T, void (T::*method)(Visitor*)>
42 void registerWeakMembers(const T* obj) 42 void registerWeakMembers(const T* obj)
43 { 43 {
44 Helper::template registerWeakMembers<T, method>(obj); 44 Helper::template registerWeakMembers<T, method>(obj);
45 } 45 }
46 46
47 protected: 47 protected:
48 // Methods to be called from MarkingVisitorImpl. 48 // Methods to be called from MarkingVisitorImpl.
49 49
50 inline bool shouldMarkObject(const void*) 50 inline bool shouldMarkObject(const void*) const
51 { 51 {
52 // As this is global marking visitor, we need to mark all objects. 52 // As this is global marking visitor, we need to mark all objects.
53 return true; 53 return true;
54 } 54 }
55 55
56 inline Visitor::MarkingMode getMarkingMode() const 56 inline Visitor::MarkingMode getMarkingMode() const
57 { 57 {
58 return Visitor::GlobalMarking; 58 return Visitor::GlobalMarking;
59 } 59 }
60 60
61 private: 61 private:
62 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) 62 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper)
63 { 63 {
64 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); 64 return *static_cast<InlinedGlobalMarkingVisitor*>(helper);
65 } 65 }
66 }; 66 };
67 67
68 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) 68 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor)
69 { 69 {
70 } 70 }
71 71
72 } // namespace blink 72 } // namespace blink
73 73
74 #endif 74 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapPage.cpp ('k') | third_party/WebKit/Source/platform/heap/MarkingVisitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698