Title: [199875] trunk/Source/WebKit2
Revision
199875
Author
zandober...@gmail.com
Date
2016-04-22 05:21:21 -0700 (Fri, 22 Apr 2016)

Log Message

NetworkCacheIOChannelSoup: detach the newly-created IOChannel::readSync thread
https://bugs.webkit.org/show_bug.cgi?id=156907

Reviewed by Carlos Garcia Campos.

* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::readSyncInThread): Detach the new thread,
ensuring the resources are released after the thread exits. Next step is
to set up a thread pool and use that, avoiding thread re-creation.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (199874 => 199875)


--- trunk/Source/WebKit2/ChangeLog	2016-04-22 07:54:22 UTC (rev 199874)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-22 12:21:21 UTC (rev 199875)
@@ -1,3 +1,15 @@
+2016-04-22  Zan Dobersek  <zdober...@igalia.com>
+
+        NetworkCacheIOChannelSoup: detach the newly-created IOChannel::readSync thread
+        https://bugs.webkit.org/show_bug.cgi?id=156907
+
+        Reviewed by Carlos Garcia Campos.
+
+        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
+        (WebKit::NetworkCache::IOChannel::readSyncInThread): Detach the new thread,
+        ensuring the resources are released after the thread exits. Next step is
+        to set up a thread pool and use that, avoiding thread re-creation.
+
 2016-04-21  Dean Jackson  <d...@apple.com>
 
         Backdrop Filter should not be visible if element has visibility:hidden

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp (199874 => 199875)


--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp	2016-04-22 07:54:22 UTC (rev 199874)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp	2016-04-22 12:21:21 UTC (rev 199875)
@@ -184,7 +184,7 @@
     ASSERT(!isMainThread());
 
     RefPtr<IOChannel> channel(this);
-    createThread("IOChannel::readSync", [channel, size, queue, completionHandler] {
+    detachThread(createThread("IOChannel::readSync", [channel, size, queue, completionHandler] {
         size_t bufferSize = std::min(size, gDefaultReadBufferSize);
         uint8_t* bufferData = static_cast<uint8_t*>(fastMalloc(bufferSize));
         GRefPtr<SoupBuffer> readBuffer = adoptGRef(soup_buffer_new_with_owner(bufferData, bufferSize, bufferData, fastFree));
@@ -218,7 +218,7 @@
             Data data = { WTFMove(buffer) };
             completionHandler(data, 0);
         }, queue);
-    });
+    }));
 }
 
 struct WriteAsyncData {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to