Current MemoryCache's behavior is a bit unpredictable in the way that developers can't really control, especially during navigation. Given that experimenting a few different behaviors don't look too difficult let's experiment what if we explicitly keep strong refs to Document's resources during navigation.
Candidate timings to clear references we've discussed:
- onload
- on parser finished
- (forever- won't try this)
More details about what we've discussed can be found on this doc:
https://docs.google.com/document/d/1aTPmpe-cCDW7VfExN-fjMTe7eU9EwBcOW4VjVx2zOSE/edit?ts=59b1cd79
Comment 1 by bugdroid1@chromium.org
, Sep 20 2017