| Index: content/public/android/java/src/org/chromium/content/common/CleanupReference.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/common/CleanupReference.java b/content/public/android/java/src/org/chromium/content/common/CleanupReference.java
|
| index 53d7ea45533d0c43db654bc49746b695ace6f281..95e61cea2fce437ca57e71da3dc6a13c7c6227c8 100644
|
| --- a/content/public/android/java/src/org/chromium/content/common/CleanupReference.java
|
| +++ b/content/public/android/java/src/org/chromium/content/common/CleanupReference.java
|
| @@ -12,8 +12,8 @@
|
| import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.TraceEvent;
|
|
|
| -import java.lang.ref.PhantomReference;
|
| import java.lang.ref.ReferenceQueue;
|
| +import java.lang.ref.WeakReference;
|
| import java.util.HashSet;
|
| import java.util.Set;
|
|
|
| @@ -25,8 +25,12 @@
|
| * cleaned up in response to java side GC of API objects. (Private/internal
|
| * interfaces should always favor explicit resource releases / destroy()
|
| * protocol for this rather than depend on GC to trigger native cleanup).
|
| + * NOTE this uses WeakReference rather than PhantomReference, to avoid delaying the
|
| + * cleanup processing until after finalizers (if any) have run. In general usage of
|
| + * this class indicates the client does NOT use finalizers anyway (Good), so this should
|
| + * not be a visible difference in practice.
|
| */
|
| -public class CleanupReference extends PhantomReference<Object> {
|
| +public class CleanupReference extends WeakReference<Object> {
|
| private static final String TAG = "cr.CleanupReference";
|
|
|
| private static final boolean DEBUG = false; // Always check in as false!
|
|
|