Merge "Make sure the finalizer destroy runs on the UI thread"

This commit is contained in:
John Reck
2011-09-13 16:55:27 -07:00
committed by Android (Google) Code Review

View File

@@ -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();
}