When a snapback page is set, the WebKit back/forward cache (AKA page cache) can grow without bound, because it will find the oldest back/forward item but will refuse to actually purge it since it is marked as the snapback item. A simple fix would be to purge the most recent non-snapback item when the page cache goes over its maximum size instead.
Created attachment 3106 [details] the fix
Created attachment 3107 [details] again, without the debug printfs Whoops, I left debug code in the last patch.
Comment on attachment 3107 [details] again, without the debug printfs r=me
Maciej landed this fix a few days ago.