| Index: Source/platform/heap/Handle.h
|
| diff --git a/Source/platform/heap/Handle.h b/Source/platform/heap/Handle.h
|
| index d3a1cc23de41db114edbae4e6c19e368a1bde476..e124b80fffbc9d3508eb84aed57a5510831d5a64 100644
|
| --- a/Source/platform/heap/Handle.h
|
| +++ b/Source/platform/heap/Handle.h
|
| @@ -948,6 +948,10 @@ public:
|
|
|
| void clear()
|
| {
|
| +#if ENABLE(ASSERT)
|
| + if (m_keepAlive)
|
| + ThreadState::decrementSelfKeepAliveAllocations();
|
| +#endif
|
| m_keepAlive.clear();
|
| }
|
|
|
| @@ -958,8 +962,12 @@ private:
|
| void assign(Self* self)
|
| {
|
| ASSERT(!m_keepAlive || m_keepAlive->get() == self);
|
| - if (!m_keepAlive)
|
| + if (!m_keepAlive) {
|
| m_keepAlive = adoptPtr(new Persistent<Self>);
|
| +#if ENABLE(ASSERT)
|
| + ThreadState::incrementSelfKeepAliveAllocations();
|
| +#endif
|
| + }
|
| *m_keepAlive = self;
|
| }
|
|
|
|
|