As createCacheFile is called from WebCore instead of http thread now, remove

the endCacheTransaction/startTransaction pairs.
This commit is contained in:
Grace Kloba
2009-08-06 18:44:02 -07:00
parent 6bfe14dea2
commit bf951c5afd
2 changed files with 0 additions and 16 deletions

View File

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

View File

@@ -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;