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

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

Issue 2036803004: Reset ThreadState weak callback stack before GCing. (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/CallbackStack.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 // 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 CallbackStack_h 5 #ifndef CallbackStack_h
6 #define CallbackStack_h 6 #define CallbackStack_h
7 7
8 #include "platform/heap/BlinkGC.h" 8 #include "platform/heap/BlinkGC.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/Assertions.h" 10 #include "wtf/Assertions.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 private: 60 private:
61 class Block { 61 class Block {
62 USING_FAST_MALLOC(Block); 62 USING_FAST_MALLOC(Block);
63 public: 63 public:
64 Block(Block* next, size_t blockSize); 64 Block(Block* next, size_t blockSize);
65 ~Block(); 65 ~Block();
66 66
67 #if ENABLE(ASSERT) 67 #if ENABLE(ASSERT)
68 void clear(); 68 void clear();
69 #endif 69 #endif
70 void reset();
70 void decommit(); 71 void decommit();
71 72
72 Block* next() const { return m_next; } 73 Block* next() const { return m_next; }
73 void setNext(Block* next) { m_next = next; } 74 void setNext(Block* next) { m_next = next; }
74 75
75 bool isEmptyBlock() const 76 bool isEmptyBlock() const
76 { 77 {
77 return m_current == &(m_buffer[0]); 78 return m_current == &(m_buffer[0]);
78 } 79 }
79 80
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Item* item = m_first->pop(); 132 Item* item = m_first->pop();
132 if (LIKELY(!!item)) 133 if (LIKELY(!!item))
133 return item; 134 return item;
134 135
135 return popSlow(); 136 return popSlow();
136 } 137 }
137 138
138 } // namespace blink 139 } // namespace blink
139 140
140 #endif // CallbackStack_h 141 #endif // CallbackStack_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/CallbackStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698