Bug 1943811 Comment 10 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I'm trying to recall why  ProbablyShortLivingWrapper is limited to wrappercached objects only:
Nursery allocated wrappers for wrapper cached objects have JSCLASS_FOREGROUND_FINALIZE | JSCLASS_SKIP_NURSERY_FINALIZE | ...
ImageData has JSCLASS_FOREGROUND_FINALIZE. And we do need foreground finalize. But without wrapper cache we can't check which objects should be finalized (given the current setup).

Maybe the simplest tweak is to make ImageData a WrapperCache object and then use ProbablyShortLivingWrapper
I'm trying to recall why  ProbablyShortLivingWrapper is limited to wrappercached objects only:
Nursery allocated wrappers for wrapper cached objects have JSCLASS_FOREGROUND_FINALIZE | JSCLASS_SKIP_NURSERY_FINALIZE | ...
ImageData has JSCLASS_FOREGROUND_FINALIZE. And we do need foreground finalize. But without wrapper cache we can't check which objects should be finalized (given the current setup).

Maybe the simplest tweak is to make ImageData a WrapperCache object and then use ProbablyShortLivingWrapper.
edit: looks like that isn't quite enough, but definitely lots of wrappers could be collected during minor GC.

Back to Bug 1943811 Comment 10