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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 1897583002: Revert of aw: Ensure WebView stays alive until functor detach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 903c00aa4325a262a00ef65d24a9288d6734134d..6c350aef581da8f80188af28408a39719a3ccc7d 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -80,10 +80,8 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
-import java.util.Set;
import java.util.concurrent.Callable;
/**
@@ -257,11 +255,6 @@
private final boolean mSupportsFunctorDetachedCallback;
private boolean mFunctorDetachedCallbackPending;
- // TODO(boliu): This is temporary for M51. AwContents is in |sGcRoots| if and only if
- // mFunctorDetachedCallbackPending is true, to ensure that the whole system do not
- // get garbage collected before functor detached callback.
- private static final Set<AwContents> sGcRoots = new HashSet<>();
-
private boolean mIsPaused;
private boolean mIsViewVisible;
private boolean mIsWindowVisible;
@@ -2355,7 +2348,6 @@
// FullScreenView.
public void onFunctorDetached() {
mFunctorDetachedCallbackPending = false;
- sGcRoots.remove(this);
if (isDestroyed(NO_WARN) && mAwGLFunctor != null) {
mAwGLFunctor.destroy();
mAwGLFunctor = null;
@@ -2959,9 +2951,6 @@
did_draw = mNativeGLDelegate.requestDrawGL(canvas, false, mContainerView);
mFunctorDetachedCallbackPending |=
(mSupportsFunctorDetachedCallback && did_draw && !isFullScreen());
- if (mFunctorDetachedCallbackPending) {
- sGcRoots.add(AwContents.this);
- }
}
if (did_draw) {
int scrollXDiff = mContainerView.getScrollX() - scrollX;
« 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