Changeset 47010 in webkit for trunk/JavaScriptCore
- Timestamp:
- Aug 10, 2009, 4:17:34 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r47003 r47010 1 2009-08-10 Mark Rowe <[email protected]> 2 3 Reviewed by Darin Adler. 4 5 Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot. 6 7 * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since 8 we implement the nothrow variants of new and new[]. The nothrow variant of delete is called 9 explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated 10 memory being passed to the system allocator to free. 11 1 12 2009-08-10 Jan Michael Alonzo <[email protected]> 2 13 -
trunk/JavaScriptCore/wtf/FastMalloc.h
r47000 r47010 185 185 WTF_PRIVATE_INLINE void* operator new(size_t size, const std::nothrow_t&) throw() { return fastMalloc(size); } 186 186 WTF_PRIVATE_INLINE void operator delete(void* p) { fastFree(p); } 187 WTF_PRIVATE_INLINE void operator delete(void* p, const std::nothrow_t&) throw() { fastFree(p); } 187 188 WTF_PRIVATE_INLINE void* operator new[](size_t size) { return fastMalloc(size); } 188 189 WTF_PRIVATE_INLINE void* operator new[](size_t size, const std::nothrow_t&) throw() { return fastMalloc(size); } 189 190 WTF_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); } 191 WTF_PRIVATE_INLINE void operator delete[](void* p, const std::nothrow_t&) throw() { fastFree(p); } 190 192 191 193 #endif
Note:
See TracChangeset
for help on using the changeset viewer.