Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf951c5a authored by Grace Kloba's avatar Grace Kloba
Browse files

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

the endCacheTransaction/startTransaction pairs.
parent 6bfe14de
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -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;
    }

+0 −5
Original line number Diff line number Diff line
@@ -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;