Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Issue 12658010: Improve CleanupReference & add test (Closed)

Created:
7 years, 9 months ago by joth
Modified:
7 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, android-webview-reviews_chromium.org
Visibility:
Public.

Description

- switch CleanupReference to have a reaper thread rather than sacrificial object, as the old design was causing many spurious messages to be sent to the UI thread. - CleanupReference now triggers when GC sees the object has become weakly rather than phantom reachable, as this can occur earlier but if sufficient for knowing we must perform native cleanup. - added some basic GC cleanup tests in CleanupReferenceTest. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=190110

Patch Set 1 #

Patch Set 2 : now passes #

Patch Set 3 : broken #

Patch Set 4 : tests pass! #

Patch Set 5 : simplified #

Total comments: 4

Patch Set 6 : track aw_contents instances rather than CleanupReferences #

Patch Set 7 : fix private #

Patch Set 8 : added CleanupReferenceTest #

Patch Set 9 : rfix (c) #

Total comments: 2

Patch Set 10 : kristian comment #

Patch Set 11 : <3 findbugs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -34 lines) Patch
M build/android/findbugs_filter/findbugs_exclude.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/common/CleanupReference.java View 1 2 3 4 5 6 7 8 9 5 chunks +56 lines, -34 lines 0 comments Download
A content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +93 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
joth
7 years, 9 months ago (2013-03-16 00:55:47 UTC) #1
David Trainor- moved to gerrit
lgtm https://chromiumcodereview.appspot.com/12658010/diff/13001/content/public/android/java/src/org/chromium/content/common/CleanupReference.java File content/public/android/java/src/org/chromium/content/common/CleanupReference.java (right): https://chromiumcodereview.appspot.com/12658010/diff/13001/content/public/android/java/src/org/chromium/content/common/CleanupReference.java#newcode31 content/public/android/java/src/org/chromium/content/common/CleanupReference.java:31: static private final String TAG = "CleanupReference"; Can ...
7 years, 9 months ago (2013-03-18 17:44:39 UTC) #2
joth
thanks. I realized I could make this less brittle by counting native AwContents instances rather ...
7 years, 9 months ago (2013-03-18 20:40:56 UTC) #3
joth
testing via AwContents is unreliable at the moment for other reasons, so I added dedicated ...
7 years, 9 months ago (2013-03-20 02:12:51 UTC) #4
Kristian Monsen
https://codereview.chromium.org/12658010/diff/25003/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java File content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java (right): https://codereview.chromium.org/12658010/diff/25003/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java#newcode54 content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java:54: System.gc(); Is this sure to work in the future? ...
7 years, 9 months ago (2013-03-20 03:59:02 UTC) #5
joth
https://codereview.chromium.org/12658010/diff/25003/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java File content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java (right): https://codereview.chromium.org/12658010/diff/25003/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java#newcode54 content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java:54: System.gc(); On 2013/03/20 03:59:02, Kristian Monsen wrote: > Is ...
7 years, 9 months ago (2013-03-20 21:00:39 UTC) #6
Kristian Monsen
On 2013/03/20 21:00:39, joth wrote: > https://codereview.chromium.org/12658010/diff/25003/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java > File > content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java > (right): > > ...
7 years, 9 months ago (2013-03-20 21:10:11 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joth@chromium.org/12658010/39001
7 years, 9 months ago (2013-03-22 04:15:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joth@chromium.org/12658010/39001
7 years, 9 months ago (2013-03-22 18:28:38 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joth@chromium.org/12658010/39001
7 years, 9 months ago (2013-03-23 15:13:27 UTC) #10
commit-bot: I haz the power
7 years, 9 months ago (2013-03-23 23:19:20 UTC) #11
Message was sent while issue was closed.
Change committed as 190110

Powered by Google App Engine
This is Rietveld 408576698