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

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

Issue 137803004: Update heap/ classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/heap/Heap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 PersistentNode* m_prev; 65 PersistentNode* m_prev;
66 66
67 template<ThreadAffinity affinity, typename Owner> friend class PersistentBas e; 67 template<ThreadAffinity affinity, typename Owner> friend class PersistentBas e;
68 friend class PersistentAnchor; 68 friend class PersistentAnchor;
69 friend class ThreadState; 69 friend class ThreadState;
70 }; 70 };
71 71
72 template<ThreadAffinity Affinity, typename Owner> 72 template<ThreadAffinity Affinity, typename Owner>
73 class PersistentBase : public PersistentNode { 73 class PersistentBase : public PersistentNode {
74 public: 74 public:
75 ~PersistentBase() 75 ~PersistentBase()
Mads Ager (chromium) 2014/01/14 07:26:43 Don't you want virtual here as well?
76 { 76 {
77 #ifndef NDEBUG 77 #ifndef NDEBUG
78 m_threadState->checkThread(); 78 m_threadState->checkThread();
79 #endif 79 #endif
80 m_next->m_prev = m_prev; 80 m_next->m_prev = m_prev;
81 m_prev->m_next = m_next; 81 m_prev->m_next = m_next;
82 } 82 }
83 83
84 protected: 84 protected:
85 inline PersistentBase() 85 inline PersistentBase()
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #endif 128 #endif
129 }; 129 };
130 130
131 // A dummy Persistent handle that ensures the list of persistents is never null. 131 // A dummy Persistent handle that ensures the list of persistents is never null.
132 // This removes a test from a hot path. 132 // This removes a test from a hot path.
133 class PersistentAnchor : public PersistentNode { 133 class PersistentAnchor : public PersistentNode {
134 public: 134 public:
135 void trace(Visitor*) { } 135 void trace(Visitor*) { }
136 136
137 private: 137 private:
138 ~PersistentAnchor() { } 138 virtual ~PersistentAnchor() { }
139 PersistentAnchor() : PersistentNode(TraceMethodDelegate<PersistentAnchor, &P ersistentAnchor::trace>::trampoline) 139 PersistentAnchor() : PersistentNode(TraceMethodDelegate<PersistentAnchor, &P ersistentAnchor::trace>::trampoline)
140 { 140 {
141 m_next = this; 141 m_next = this;
142 m_prev = this; 142 m_prev = this;
143 } 143 }
144 144
145 friend class ThreadState; 145 friend class ThreadState;
146 }; 146 };
147 147
148 // Persistent handles are used to store pointers into the 148 // Persistent handles are used to store pointers into the
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 }; 528 };
529 529
530 template<typename Key, typename Value, typename Extractor, typename Traits, type name KeyTraits> 530 template<typename Key, typename Value, typename Extractor, typename Traits, type name KeyTraits>
531 struct IsWeak<WebCore::HeapHashTableBacking<Key, Value, Extractor, Traits, KeyTr aits> > { 531 struct IsWeak<WebCore::HeapHashTableBacking<Key, Value, Extractor, Traits, KeyTr aits> > {
532 static const bool value = Traits::isWeak; 532 static const bool value = Traits::isWeak;
533 }; 533 };
534 534
535 } // namespace WTF 535 } // namespace WTF
536 536
537 #endif 537 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698