summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-09-13 16:55:27 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-13 16:55:27 -0700
commit9d19923bb599bee6137a4adab17675d954f0584a (patch)
treed52a81cb780a4e899295e4256de7f0c8fa20dc4d
parentc75994947a5708f808c80a75358309f351e8e60f (diff)
parentb9376464ab3bbbf1c97aa6675987d4555c8c51e9 (diff)
downloadframeworks_base-9d19923bb599bee6137a4adab17675d954f0584a.zip
frameworks_base-9d19923bb599bee6137a4adab17675d954f0584a.tar.gz
frameworks_base-9d19923bb599bee6137a4adab17675d954f0584a.tar.bz2
Merge "Make sure the finalizer destroy runs on the UI thread"
-rw-r--r--core/java/android/webkit/WebView.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 065beb1..1f14b05 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -4021,7 +4021,14 @@ public class WebView extends AbsoluteLayout
@Override
protected void finalize() throws Throwable {
try {
- destroyImpl();
+ if (mNativeClass != 0) {
+ post(new Runnable() {
+ @Override
+ public void run() {
+ destroy();
+ }
+ });
+ }
} finally {
super.finalize();
}