Changeset 148314 in webkit


Ignore:
Timestamp:
Apr 12, 2013 4:43:13 PM (11 years ago)
Author:
mhahnenberg@apple.com
Message:

Block freeing thread should call Region::destroy instead of delete
https://bugs.webkit.org/show_bug.cgi?id=114544

Reviewed by Oliver Hunt.

Since Region doesn't have a virtual destructor, calling delete will not properly clean up all of
the state of the Region. We should call destroy() instead.

  • heap/BlockAllocator.cpp:

(JSC::BlockAllocator::releaseFreeRegions):
(JSC::BlockAllocator::blockFreeingThreadMain):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r148259 r148314  
     12013-04-12  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        Block freeing thread should call Region::destroy instead of delete
     4        https://bugs.webkit.org/show_bug.cgi?id=114544
     5
     6        Reviewed by Oliver Hunt.
     7
     8        Since Region doesn't have a virtual destructor, calling delete will not properly clean up all of
     9        the state of the Region. We should call destroy() instead.
     10
     11        * heap/BlockAllocator.cpp:
     12        (JSC::BlockAllocator::releaseFreeRegions):
     13        (JSC::BlockAllocator::blockFreeingThreadMain):
     14
    1152013-04-11  Benjamin Poulain  <bpoulain@apple.com>
    216
  • trunk/Source/JavaScriptCore/heap/BlockAllocator.cpp

    r147330 r148314  
    7979            break;
    8080
    81         delete region;
     81        region->destroy();
    8282    }
    8383}
     
    151151                break;
    152152           
    153             delete region;
     153            region->destroy();
    154154        }
    155155    }
Note: See TracChangeset for help on using the changeset viewer.