2008-05-13 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2008 00:46:41 +0000 (00:46 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2008 00:46:41 +0000 (00:46 +0000)
        Reviewed by Sam.

        Don't empty the application cache in _setCacheModel, since it will be called during initialization.
        Instead, do it in [WebCache empty].

        * Misc/WebCache.mm:
        (+[WebCache empty]):
        * WebView/WebView.mm:
        (+[WebView _setCacheModel:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33423 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/mac/ChangeLog
WebKit/mac/Misc/WebCache.mm
WebKit/mac/WebView/WebView.mm

index a825d60..2058e3b 100644 (file)
@@ -1,3 +1,15 @@
+2008-05-13  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Sam.
+
+        Don't empty the application cache in _setCacheModel, since it will be called during initialization.
+        Instead, do it in [WebCache empty].
+        
+        * Misc/WebCache.mm:
+        (+[WebCache empty]):
+        * WebView/WebView.mm:
+        (+[WebView _setCacheModel:]):
+
 2008-05-13  chris fleizach  <cfleizach@apple.com>
 
         Reviewed by Beth Dakin
index 1c1850b..fe722ed 100644 (file)
@@ -28,6 +28,7 @@
 #import "WebPreferences.h"
 #import "WebView.h"
 #import "WebViewInternal.h"
+#import <WebCore/ApplicationCacheStorage.h>
 #import <WebCore/Cache.h>
 
 @implementation WebCache
@@ -70,6 +71,9 @@
     WebCacheModel cacheModel = [WebView _cacheModel];
     [WebView _setCacheModel:WebCacheModelDocumentViewer];
     [WebView _setCacheModel:cacheModel];
+        
+    // Empty the application cache.
+    WebCore::cacheStorage().empty();
 }
 
 + (void)setDisabled:(BOOL)disabled
index d48e519..71d68c2 100644 (file)
@@ -4065,9 +4065,6 @@ static WebFrameView *containingFrameView(NSView *view)
     pageCache()->setCapacity(pageCacheCapacity);
     [nsurlCache setMemoryCapacity:nsurlCacheMemoryCapacity];
     [nsurlCache setDiskCapacity:nsurlCacheDiskCapacity];
-
-    // Empty the application cache.
-    cacheStorage().empty();
     
     s_cacheModel = cacheModel;
     s_didSetCacheModel = YES;