Commit a8f7b13b authored by ggaren@apple.com's avatar ggaren@apple.com

2011-04-04 Geoffrey Garen <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Removed a redundant variable from HandleHeap
        https://bugs.webkit.org/show_bug.cgi?id=57786
        
        We don't need a specific variable to indicate that we're in the middle
        of the finalization phase, since m_nextToFinalize already does this.

        * collector/handles/HandleHeap.cpp:
        (JSC::HandleHeap::HandleHeap):
        (JSC::HandleHeap::clearWeakPointers):
        (JSC::HandleHeap::writeBarrier):


git-svn-id: svn://svn.chromium.org/blink/trunk@82871 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7c2f18b6
2011-04-04 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Removed a redundant variable from HandleHeap
https://bugs.webkit.org/show_bug.cgi?id=57786
We don't need a specific variable to indicate that we're in the middle
of the finalization phase, since m_nextToFinalize already does this.
* collector/handles/HandleHeap.cpp:
(JSC::HandleHeap::HandleHeap):
(JSC::HandleHeap::clearWeakPointers):
(JSC::HandleHeap::writeBarrier):
2011-04-04 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
......
......@@ -34,9 +34,6 @@ namespace JSC {
HandleHeap::HandleHeap(JSGlobalData* globalData)
: m_globalData(globalData)
, m_nextToFinalize(0)
#if !ASSERT_DISABLED
, m_handlingFinalizers(false)
#endif
{
grow();
}
......@@ -65,10 +62,6 @@ void HandleHeap::updateAfterMark()
void HandleHeap::clearWeakPointers()
{
#if !ASSERT_DISABLED
m_handlingFinalizers = true;
#endif
Node* end = m_weakList.end();
for (Node* node = m_weakList.begin(); node != end; node = m_nextToFinalize) {
m_nextToFinalize = node->next();
......@@ -96,15 +89,14 @@ void HandleHeap::clearWeakPointers()
SentinelLinkedList<Node>::remove(node);
m_immediateList.push(node);
}
#if !ASSERT_DISABLED
m_handlingFinalizers = false;
#endif
m_nextToFinalize = 0;
}
void HandleHeap::writeBarrier(HandleSlot slot, const JSValue& value)
{
ASSERT(!m_handlingFinalizers);
ASSERT(!m_nextToFinalize); // Forbid assignment to handles during the finalization phase, since it would violate many GC invariants.
if (slot->isCell() == value.isCell() && !value == !*slot)
return;
Node* node = toNode(slot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment