Fix for font files being mmaped multiple times (Fontconfig).
Before this change, when there were a lot of font fallbacks happening on the web site, the fallback font was mmaped multiple times, reaching up to 200 times in the TC url: http://jsfiddle.net/p5pe81vs/, leading to OOMs and crashes for renderer process. This happens after the change introduced in https://codereview.chromium.org/307243002 This CL keeps track of the mmaps for each font ID to avoid any further unnecessary IPC requests and mmaps for future requests of the same font ID that would result in new FD. BUG=430021 NOPRESUBMIT=true brettw indicates this use of ScopedAllowIO is acceptable. Previous code eluded IO checks, this change makes the IO use find-able. Committed: https://crrev.com/78db5e535ef48c596223fe272572e5679fbb44fd Cr-Commit-Position: refs/heads/master@{#313102} Review URL: https://codereview.chromium.org/697383002 Cr-Commit-Position: refs/heads/master@{#314314}
Showing
Please register or sign in to comment