| OLD | NEW |
| 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/ThreadState.h" | 8 #include "platform/heap/ThreadState.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void append(CallbackStack*); | 47 void append(CallbackStack*); |
| 48 void takeBlockFrom(CallbackStack*); | 48 void takeBlockFrom(CallbackStack*); |
| 49 | 49 |
| 50 void invokeEphemeronCallbacks(Visitor*); | 50 void invokeEphemeronCallbacks(Visitor*); |
| 51 | 51 |
| 52 #if ENABLE(ASSERT) | 52 #if ENABLE(ASSERT) |
| 53 bool hasCallbackForObject(const void*); | 53 bool hasCallbackForObject(const void*); |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 static const size_t blockSize = 200; | 56 static const size_t blockSize = 128; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 class Block; | 59 class Block; |
| 60 | 60 |
| 61 void invokeOldestCallbacks(Block*, Block*, Visitor*); | 61 void invokeOldestCallbacks(Block*, Block*, Visitor*); |
| 62 bool hasJustOneBlock() const; | 62 bool hasJustOneBlock() const; |
| 63 void swap(CallbackStack* other); | 63 void swap(CallbackStack* other); |
| 64 | 64 |
| 65 Block* m_first; | 65 Block* m_first; |
| 66 Block* m_last; | 66 Block* m_last; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } | 69 } |
| 70 | 70 |
| 71 #endif // CallbackStack_h | 71 #endif // CallbackStack_h |
| OLD | NEW |