As createCacheFile is called from WebCore instead of http thread now, remove
the endCacheTransaction/startTransaction pairs.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user