Changeset 143354 in webkit


Ignore:
Timestamp:
Feb 19, 2013 10:40:03 AM (11 years ago)
Author:
mhahnenberg@apple.com
Message:

HeapBlock::destroy should issue warning if result is unused
https://bugs.webkit.org/show_bug.cgi?id=110233

Reviewed by Oliver Hunt.

To enforce the fact that we need to return blocks to the BlockAllocator after calling destroy,
we should add WARN_UNUSED_RETURN to HeapBlock::destroy and any other destroy functions in its subclasses.

  • heap/HeapBlock.h:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r143351 r143354  
     12013-02-19  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        HeapBlock::destroy should issue warning if result is unused
     4        https://bugs.webkit.org/show_bug.cgi?id=110233
     5
     6        Reviewed by Oliver Hunt.
     7
     8        To enforce the fact that we need to return blocks to the BlockAllocator after calling destroy,
     9        we should add WARN_UNUSED_RETURN to HeapBlock::destroy and any other destroy functions in its subclasses.
     10
     11        * heap/HeapBlock.h:
     12
    1132013-02-19  Mark Hahnenberg  <mhahnenberg@apple.com>
    214
  • trunk/Source/JavaScriptCore/heap/HeapBlock.h

    r131321 r143354  
    4646    friend CLASS_IF_GCC DoublyLinkedListNode<T>;
    4747public:
    48     static HeapBlock* destroy(HeapBlock* block)
     48    static HeapBlock* destroy(HeapBlock* block) WARN_UNUSED_RETURN
    4949    {
    5050        static_cast<T*>(block)->~T();
Note: See TracChangeset for help on using the changeset viewer.