I've temporarily made a cache use Global<> however it may be possible to make that produce ref cycles. I'm also unsure how correct the method cache is -- if more than one JS object uses the same backing instance the two objects may share function instances. I don't know if this is possible, or even desired, just recording the observation.
Created attachment 90230 [details] Patch
Attachment 90230 [details] did not build on qt: Build output: http://queues.webkit.org/results/8475357
Created attachment 90238 [details] Patch
Attachment 90238 [details] did not build on qt: Build output: http://queues.webkit.org/results/8475377
Created attachment 90244 [details] same as earlier, with build fix
Comment on attachment 90244 [details] same as earlier, with build fix !em=r
Committed r84286: <http://trac.webkit.org/changeset/84286>