diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 20:49:06 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 20:49:06 +0000 |
commit | 3da87b4b28bf2dd6758cac894cea570a0539af63 (patch) | |
tree | b9e9c1ccbf2fc91581b7e1f7ec8cdc9aff24ee70 /third_party/cld | |
parent | 2cb07b2b19da64dbcdc978773d1d4c5d4522c948 (diff) | |
download | chromium_src-3da87b4b28bf2dd6758cac894cea570a0539af63.zip chromium_src-3da87b4b28bf2dd6758cac894cea570a0539af63.tar.gz chromium_src-3da87b4b28bf2dd6758cac894cea570a0539af63.tar.bz2 |
Fix StatsTable::RegisterThread so that it doesn't crash if shared memory
couldn't be allocated. Instead, it just returns 0.
Also, fix StatsTable::AddCounter so that it's not a fatal error if shared
memory couldn't be allocated. Instead, it just returns 0.
In StatsTableTest::StatsCounter, we now assert that the counter could be
created, rather than just expecting it. Much of the remainder of the test
relies on the fact that foo.Pointer() is non-NULL, and would crash if it
were NULL.
TEST= StatsTableTest.* RenderViewTest.*
Didn't test on Linux (still figuring out how to build on that plaform).
Instead, tested on Mac OS X by modifying StatsTablePrivate::New to return NULL,
and then ran:
unit_tests --gtest_filter='Render*'
base_unittests --gtest_filter='StatsTableTest.*'
Both tests tests crashed.
Then, I applied the changes in this CL, reran the tests, and verified
the crashing no longer occured.
BUG=13193
BUG=13196
Review URL: http://codereview.chromium.org/126100
Patch from Neil Rhodes <nrhodes@google.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/cld')
0 files changed, 0 insertions, 0 deletions