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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 1838773002: Clarify ShowKeyboardResultReceiver comment in ContentViewCore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index c1792f6a366650043880b6ea942dd5b4da9737ba..935fbf2b2433d1ef82f6724bdacc8a19b576c10e 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -367,8 +367,9 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
*/
private static class ShowKeyboardResultReceiver extends ResultReceiver {
- // Unfortunately, ResultReceiver used in showSoftInput() will be leaked. We minimize
- // the leak by weak referencing CVC and therefore WebView object.
+ // Unfortunately, the memory life cycle of ResultReceiver object, once passed in
+ // showSoftInput(), is in the control of Android's input method framework and IME app,
+ // so we use a weakref to avoid tying CVC's lifetime to that of ResultReceiver object.
private final WeakReference<ContentViewCore> mContentViewCore;
public ShowKeyboardResultReceiver(ContentViewCore contentViewCore, Handler handler) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698