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

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

Issue 1903673003: [Merge M50] aw: Do not destroy functor in destroy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
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 | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | 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/AwGLFunctor.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwGLFunctor.java b/android_webview/java/src/org/chromium/android_webview/AwGLFunctor.java
index 4f375892675f7fa4aec00666362ad4dd1697275f..e43b840fbf980e8ebd1a83b5794acca5899a77fc 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwGLFunctor.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwGLFunctor.java
@@ -9,6 +9,7 @@ import android.view.ViewGroup;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
+import org.chromium.content.common.CleanupReference;
/**
* Manages state associated with the Android render thread and the draw functor
@@ -33,6 +34,7 @@ class AwGLFunctor {
private final long mNativeAwGLFunctor;
private final DestroyRunnable mDestroyRunnable;
+ private final CleanupReference mCleanupReference;
private final AwContents.NativeGLDelegate mNativeGLDelegate;
private final ViewGroup mContainerView;
private final Runnable mFunctorReleasedCallback;
@@ -40,6 +42,7 @@ class AwGLFunctor {
public AwGLFunctor(AwContents.NativeGLDelegate nativeGLDelegate, ViewGroup containerView) {
mNativeAwGLFunctor = nativeCreate(this);
mDestroyRunnable = new DestroyRunnable(mNativeAwGLFunctor);
+ mCleanupReference = new CleanupReference(mDestroyRunnable, mDestroyRunnable);
mNativeGLDelegate = nativeGLDelegate;
mContainerView = containerView;
if (mNativeGLDelegate.supportsDrawGLFunctorReleasedCallback()) {
@@ -63,7 +66,7 @@ class AwGLFunctor {
return mNativeAwGLFunctor;
}
- public Runnable getDestroyRunnable() {
+ public Object getNativeLifetimeObject() {
return mDestroyRunnable;
}
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698