|
Revert 205059 "We were seeing ActivityLog memory leaks and assor..."
> 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
TBR=felt@chromium.org
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+196 lines, -108 lines) |
Patch |
 |
M |
trunk/src/chrome/browser/extensions/activity_log/activity_actions.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/activity_database.h
|
View
|
|
4 chunks |
+17 lines, -17 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/activity_database.cc
|
View
|
|
10 chunks |
+36 lines, -55 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/activity_database_unittest.cc
|
View
|
|
8 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/activity_log.h
|
View
|
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/activity_log.cc
|
View
|
|
4 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc
|
View
|
|
3 chunks |
+19 lines, -0 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/api_actions.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/api_actions.cc
|
View
|
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/blocked_actions.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/blocked_actions.cc
|
View
|
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
 |
MM |
trunk/src/chrome/browser/extensions/activity_log/dom_actions.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
trunk/src/chrome/browser/extensions/activity_log/dom_actions.cc
|
View
|
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
trunk/src/tools/heapcheck/suppressions.txt
|
View
|
|
1 chunk |
+40 lines, -0 lines |
0 comments
|
Download
|
 |
M |
trunk/src/tools/valgrind/memcheck/suppressions.txt
|
View
|
|
1 chunk |
+50 lines, -0 lines |
0 comments
|
Download
|
Total messages: 6 (0 generated)
|