Title: [269080] trunk/Tools
Revision
269080
Author
wei...@apple.com
Date
2020-10-27 16:50:40 -0700 (Tue, 27 Oct 2020)

Log Message

DumpRenderTree spams stderr with CFNetwork warnings about null diskcache path
https://bugs.webkit.org/show_bug.cgi?id=218241

Reviewed by Darin Adler.

Remove attempt at using a memory only shared URL cache, as subsequent calls
to [WebPreferences setCacheModel:] cause a disk cache to be used anyway. All
this really seems to do is cause CFNetwork to log to stderr. It's unlikely
this optimization is worthwhile anyway these days, as avoiding touching the
filesystem is less necessary.

* DumpRenderTree/mac/DumpRenderTree.mm:
(prepareConsistentTestingEnvironment):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (269079 => 269080)


--- trunk/Tools/ChangeLog	2020-10-27 23:23:28 UTC (rev 269079)
+++ trunk/Tools/ChangeLog	2020-10-27 23:50:40 UTC (rev 269080)
@@ -1,3 +1,19 @@
+2020-10-27  Sam Weinig  <wei...@apple.com>
+
+        DumpRenderTree spams stderr with CFNetwork warnings about null diskcache path
+        https://bugs.webkit.org/show_bug.cgi?id=218241
+
+        Reviewed by Darin Adler.
+
+        Remove attempt at using a memory only shared URL cache, as subsequent calls
+        to [WebPreferences setCacheModel:] cause a disk cache to be used anyway. All
+        this really seems to do is cause CFNetwork to log to stderr. It's unlikely
+        this optimization is worthwhile anyway these days, as avoiding touching the
+        filesystem is less necessary.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (prepareConsistentTestingEnvironment):
+
 2020-10-27  Brian Burg  <bb...@apple.com>
 
         [Cocoa] Introduce _WKInspectorConfiguration for customizing local and remote Web Inspectors

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (269079 => 269080)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-10-27 23:23:28 UTC (rev 269079)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-10-27 23:50:40 UTC (rev 269080)
@@ -1216,14 +1216,6 @@
 
     [[WebPreferences standardPreferences] setAutosaves:NO];
 
-    // +[WebPreferences _switchNetworkLoaderToNewTestingSession] calls +[NSURLCache sharedURLCache], which initializes a default cache on disk.
-    // Making the shared cache memory-only avoids touching the file system.
-    RetainPtr<NSURLCache> sharedCache =
-        adoptNS([[NSURLCache alloc] initWithMemoryCapacity:1024 * 1024
-                                      diskCapacity:0
-                                          diskPath:nil]);
-    [NSURLCache setSharedURLCache:sharedCache.get()];
-
     [WebPreferences _switchNetworkLoaderToNewTestingSession];
 
 #if !PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to