diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-21 16:50:16 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-21 16:50:16 +0000 |
commit | 3cca4a5ec9a8f2f26eb0807c137c4f71f8d74474 (patch) | |
tree | 671f80939f8c72d3fc53ce90b09630663f0ab1ed /chrome | |
parent | c2a797d2872ec1a32339adca5b8fd1441dc27934 (diff) | |
download | chromium_src-3cca4a5ec9a8f2f26eb0807c137c4f71f8d74474.zip chromium_src-3cca4a5ec9a8f2f26eb0807c137c4f71f8d74474.tar.gz chromium_src-3cca4a5ec9a8f2f26eb0807c137c4f71f8d74474.tar.bz2 |
Adds NOTREACHED if we ever hit the max cache size of the render pict
format cache.
BUG=none
TEST=none
TBR=estade
Review URL: http://codereview.chromium.org/217002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/x11_util.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/common/x11_util.cc b/chrome/common/x11_util.cc index 14f85d9..eb8d1b4 100644 --- a/chrome/common/x11_util.cc +++ b/chrome/common/x11_util.cc @@ -380,8 +380,17 @@ XRenderPictFormat* GetRenderVisualFormat(Display* dpy, Visual* visual) { cached_value.format = pictformat; formats->push_front(cached_value); - if (formats->size() == kMaxCacheSize) + if (formats->size() == kMaxCacheSize) { formats->pop_back(); + // We should really only have at most 2 display/visual combinations: + // one for normal browser windows, and possibly another for an argb window + // created to display a menu. + // + // If we get here it's not fatal, we just need to make sure we aren't + // always blowing away the cache. If we are, then we should figure out why + // and make it bigger. + NOTREACHED(); + } return pictformat; } |