From bf951c5afdae020befac8099a9e13a851d26863c Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Thu, 6 Aug 2009 18:44:02 -0700 Subject: [PATCH] As createCacheFile is called from WebCore instead of http thread now, remove the endCacheTransaction/startTransaction pairs. --- core/java/android/webkit/BrowserFrame.java | 11 ----------- core/java/android/webkit/CacheManager.java | 5 ----- 2 files changed, 16 deletions(-) diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java index 06581c16956d0..2ac77ac86d5ef 100644 --- a/core/java/android/webkit/BrowserFrame.java +++ b/core/java/android/webkit/BrowserFrame.java @@ -560,13 +560,6 @@ class BrowserFrame extends Handler { return loadListener; } - // during synchronous load, the WebViewCore thread is blocked, so we - // need to endCacheTransaction first so that http thread won't be - // blocked in setupFile() when createCacheFile. - if (synchronous) { - CacheManager.endCacheTransaction(); - } - FrameLoader loader = new FrameLoader(loadListener, mSettings, method); loader.setHeaders(headers); loader.setPostData(postData); @@ -581,10 +574,6 @@ class BrowserFrame extends Handler { } checker.responseAlert("startLoadingResource succeed"); - if (synchronous) { - CacheManager.startCacheTransaction(); - } - return !synchronous ? loadListener : null; } diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java index 9a02fbeecc0a0..7b32a262ce49a 100644 --- a/core/java/android/webkit/CacheManager.java +++ b/core/java/android/webkit/CacheManager.java @@ -534,12 +534,7 @@ public final class CacheManager { // cache file. If it is not, resolve the collision. while (file.exists()) { if (checkOldPath) { - // as this is called from http thread through - // createCacheFile, we need endCacheTransaction before - // database access. - WebViewCore.endCacheTransaction(); CacheResult oldResult = mDataBase.getCache(url); - WebViewCore.startCacheTransaction(); if (oldResult != null && oldResult.contentLength > 0) { if (path.equals(oldResult.localPath)) { path = oldResult.localPath;