Title: [187600] trunk/Source/WebKit2
Revision
187600
Author
cdu...@apple.com
Date
2015-07-30 12:40:56 -0700 (Thu, 30 Jul 2015)

Log Message

[WK2][NetworkCache] Stop closing files on the main thread
https://bugs.webkit.org/show_bug.cgi?id=147410

Reviewed by Andreas Kling.

After r186510, we no longer open cache files on the main thread.
However, we still close them on the main thread. This patch makes
sure we close the files on another thread instead.

* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (187599 => 187600)


--- trunk/Source/WebKit2/ChangeLog	2015-07-30 19:26:29 UTC (rev 187599)
+++ trunk/Source/WebKit2/ChangeLog	2015-07-30 19:40:56 UTC (rev 187600)
@@ -1,3 +1,17 @@
+2015-07-30  Chris Dumez  <cdu...@apple.com>
+
+        [WK2][NetworkCache] Stop closing files on the main thread
+        https://bugs.webkit.org/show_bug.cgi?id=147410
+
+        Reviewed by Andreas Kling.
+
+        After r186510, we no longer open cache files on the main thread.
+        However, we still close them on the main thread. This patch makes
+        sure we close the files on another thread instead.
+
+        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
+        (WebKit::NetworkCache::IOChannel::IOChannel):
+
 2015-07-30  Simon Fraser  <simon.fra...@apple.com>
 
         Convert Path applier to use std::function

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm (187599 => 187600)


--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm	2015-07-30 19:26:29 UTC (rev 187599)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm	2015-07-30 19:40:56 UTC (rev 187600)
@@ -69,7 +69,7 @@
     int fd = ::open(path.data(), oflag, mode);
     m_fileDescriptor = fd;
 
-    m_dispatchIO = adoptDispatch(dispatch_io_create(DISPATCH_IO_RANDOM, fd, dispatch_get_main_queue(), [fd](int) {
+    m_dispatchIO = adoptDispatch(dispatch_io_create(DISPATCH_IO_RANDOM, fd, dispatch_get_global_queue(useLowIOPriority ? DISPATCH_QUEUE_PRIORITY_BACKGROUND : DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), [fd](int) {
         close(fd);
     }));
     ASSERT(m_dispatchIO.get());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to