diff options
author | felt@chromium.org <felt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 13:47:58 +0000 |
---|---|---|
committer | felt@chromium.org <felt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 13:47:58 +0000 |
commit | 8d055e4ba1d2a975d356e7a1d06254d2de377c8b (patch) | |
tree | 89d52809085d8dc858f43e80cf86155b44d477b3 /tools/heapcheck | |
parent | 46fae6abc902c08d77b130c3bd2f6f3a6faa867c (diff) | |
download | chromium_src-8d055e4ba1d2a975d356e7a1d06254d2de377c8b.zip chromium_src-8d055e4ba1d2a975d356e7a1d06254d2de377c8b.tar.gz chromium_src-8d055e4ba1d2a975d356e7a1d06254d2de377c8b.tar.bz2 |
We were seeing ActivityLog memory leaks and assorted other errors. It was due to poor handling of error conditions (not cleaning up the DB state if something goes wrong). This CL should fix that.
Added every error-handling measure I could think of:
1. Moves the error handling into the ActivityDatabase class so that we can immediately (synchronously) kill the database, instead of asynchronously doing it from the ActivityLog
2. Closes the db even for non-catastrophic errors, so that we aren't just hammering away when the I/O thread has gone wonky
3. Adds checks in ActivityDatabase to see if the db is valid so that we aren't constantly continuing to try to write to a closed database
4. Removes dead code that I had superstitiously added to the activity_log_unittest to see if adding it would remove the memory leaks (it didn't)
5. Failures in Init explicitly call the error handling code, in case it isn't automatically triggered
6. Record now returns a bool, so we can stop trying to record actions if one has failed
7. In the case of unittests where everything is running on one thread anyway, ActivityLog synchronously kills the Activity Database
8. ActivityLog does cleanup on Shutdown, which happens before references start dying
BUG=246825
Review URL: https://chromiumcodereview.appspot.com/16510002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/heapcheck')
-rw-r--r-- | tools/heapcheck/suppressions.txt | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt index 36f5fd1..6ba23f0 100644 --- a/tools/heapcheck/suppressions.txt +++ b/tools/heapcheck/suppressions.txt @@ -1784,46 +1784,6 @@ fun:Handle } { - bug_246825a - Heapcheck:Leak - ... - fun:sql::Connection::GetCachedStatement - ... - fun:extensions::ActivityDatabase::Init -} -{ - bug_246825b - Heapcheck:Leak - fun:__gnu_cxx::new_allocator::allocate - fun:std::_Vector_base::_M_allocate - fun:std::vector::_M_insert_aux - fun:std::vector::push_back - fun:extensions::ActivityDatabase::RecordAction -} -{ - bug_246825c - Heapcheck:Leak - fun:base::Bind - fun:base::BaseTimerMethodPointer::Start - fun:extensions::ActivityDatabase::Init -} -{ - bug_246825d - Heapcheck:Leak - ... - fun:LogExtensionActivity - fun:ExtensionWebRequestEventRouter::DecrementBlockCount - fun:ExtensionWebRequestEventRouter::OnEventHandled - fun:EventHandledOnIOThread -} -{ - bug_246825e - Heapcheck:Leak - fun:sqlite3MemMalloc - ... - fun:extensions::ActivityDatabase::Init -} -{ bug_247525 Heapcheck:Leak ... |