[webkit-help] JSGlobalData destructor

charles at hailoo.com charles at hailoo.com
Sat Feb 9 21:32:48 PST 2013


I'm porting WebKit to a custom platform, and have been running into 
problems with LEAKED node references for DOMs which include SCRIPT 
elements.  It seems the problem is that the BlockAllocator thread is not 
exiting, because the BlockAllocator object is not being destructed.  The 
BlockAllocator object is a field of JSC::Heap, which is a field of 
JSC::JSGlobalData.

JSGlobalData seems to be a Singleton created through 
JSDOMWindowBase::commonJSGlobalData.  It is ref-counted, but 
JSDOMWindowBase::commonJSGlobalData returns a raw pointer.  So it would 
seem that the object returned from JSDOMWindowBase::commonJSGlobalData 
has to be deallocated SOMEWHERE, either with a call to delete or a call 
to ->deref(), but I've examined the GTK port and I can't see where it is 
supposed to be allocated.

So, how is the JSGlobalData Singleton supposed to be deallocated?


More information about the webkit-help mailing list