HashTable::createTable() allocates new HashEntry array, but HashTable::deleteTable() is not always called, so this array may not be deleted. It can then introduce memory leaks, valgrind gives one of around 800ko on a single gmail visit. My fix is to call the deleteTable() in the HashTable destructor. It is secured and fixes the memory leak.
Created attachment 24714 [details] fix a memory leak on HashTable
Comment on attachment 24714 [details] fix a memory leak on HashTable HashTable::deleteTable is called from JSGlobalData destructor to avoid having destructors for static objects, which this patch would introduce. However, the problem is real - in WebCore/bindings/js/JSDOMBinding.cpp, DOMObjectHashTableMap isn't properly cleaned up! This only affects worker threads though.
Created attachment 24719 [details] proposed fix Fix the problem in WebCore.
Comment on attachment 24719 [details] proposed fix r=me
Committed revision 37968.