As far as I can see, this is a vestige of the long-dead word-caching scheme we used to use, and no longer serves any purpose. nsTextFrame code still puts things into this cache, but nobody ever looks anything up there, so it's just a waste of time and space. So I propose to kill it.
With gTextRuns out of the picture, it's easier to see that switching mTextRunsToDelete to be an array of UniquePtr<>s, as Jeff suggested in bug 1265459 comment 5, is a reasonable thing to do.
(In reply to Jonathan Kew (:jfkthame) from comment #0) > As far as I can see, this is a vestige of the long-dead word-caching scheme > we used to use, and no longer serves any purpose. nsTextFrame code still > puts things into this cache, but nobody ever looks anything up there, so > it's just a waste of time and space. So I propose to kill it. Hmm, on looking again, I'm not entirely sure this is true; we may still depend on the cache's expiration behavior to delete uninflated runs stashed in the textframe's UninflatedTextRunProperty(). Clearing r? for now, until I'm more confident what's going on there.
I *think* we're not shipping font inflation anywhere anymore, so it may be safe to start letting it bitrot.
We still have font-inflation reftests in the tree, AFAICS; and as far as tryserver can tell, they don't seem to be leaking textruns with the patches here, so I think my concern in comment 3 may have been unfounded.  https://treeherder.mozilla.org/#/jobs?repo=try&revision=de46a1a7a32f
OK, this doesn't lead to us leaking anything; it's simply old code that we no longer need, as we don't attempt to cache shaped words in terms of ranges of other textruns. We can also remove the related gtest file (which was disabled 'on suspicion' some time ago anyhow, and then forgotten about AFAICT).
Attachment #8742697 - Attachment is obsolete: true
Comment on attachment 8742997 [details] [diff] [review] Remove the global nsTextFrameTextRunCache, as it no longer serves any useful purpose Nice!
Attachment #8742997 - Flags: review?(mats) → review+
You need to log in before you can comment on or make changes to this bug.