DescriptionFix 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
Patch Set 1 #
Total comments: 2
Patch Set 2 : '' #
Total comments: 1
Patch Set 3 : '' #
Messages
Total messages: 9 (0 generated)
|