<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[180410] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180410">180410</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2015-02-20 06:18:52 -0800 (Fri, 20 Feb 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move WorkQueue from WK2 to WTF
https://bugs.webkit.org/show_bug.cgi?id=141797
Reviewed by Anders Carlsson.
Source/WebKit2:
* CMakeLists.txt:
* DatabaseProcess/DatabaseProcess.h:
* Platform/IPC/Connection.h:
* Platform/WorkQueue.cpp: Removed.
* Platform/WorkQueue.h: Removed.
* Platform/efl/WorkQueueEfl.cpp: Removed.
* Platform/gtk/WorkQueueGtk.cpp: Removed.
* Platform/mac/WorkQueueMac.cpp: Removed.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* UIProcess/Launcher/ProcessLauncher.cpp:
* UIProcess/Storage/LocalStorageDatabase.cpp:
* UIProcess/Storage/LocalStorageDatabase.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
* UIProcess/Storage/StorageManager.h:
* WebKit2.xcodeproj/project.pbxproj:
Source/WTF:
It may be useful in WebCore.
Windows implementation is still missing.
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PlatformGTK.cmake:
* wtf/WorkQueue.cpp: Copied from Source/WebKit2/Platform/WorkQueue.cpp.
* wtf/WorkQueue.h: Copied from Source/WebKit2/Platform/WorkQueue.h.
* wtf/cocoa: Added.
* wtf/cocoa/WorkQueueCocoa.cpp: Copied from Source/WebKit2/Platform/mac/WorkQueueMac.cpp.
* wtf/efl/WorkQueueEfl.cpp: Copied from Source/WebKit2/Platform/efl/WorkQueueEfl.cpp.
* wtf/gtk/WorkQueueGtk.cpp: Copied from Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFWTFxcodeprojprojectpbxproj">trunk/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWTFwtfCMakeListstxt">trunk/Source/WTF/wtf/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWTFwtfPlatformGTKcmake">trunk/Source/WTF/wtf/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessDatabaseProcessh">trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCConnectionh">trunk/Source/WebKit2/Platform/IPC/Connection.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformEflcmake">trunk/Source/WebKit2/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2SharedNetworkCustomProtocolsCustomProtocolManagerh">trunk/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLauncherProcessLaunchercpp">trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageLocalStorageDatabasecpp">trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageLocalStorageDatabaseh">trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageLocalStorageDatabaseTrackercpp">trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageLocalStorageDatabaseTrackerh">trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageStorageManagercpp">trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageStorageManagerh">trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtfWorkQueuecpp">trunk/Source/WTF/wtf/WorkQueue.cpp</a></li>
<li><a href="#trunkSourceWTFwtfWorkQueueh">trunk/Source/WTF/wtf/WorkQueue.h</a></li>
<li>trunk/Source/WTF/wtf/cocoa/</li>
<li><a href="#trunkSourceWTFwtfcocoaWorkQueueCocoacpp">trunk/Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp</a></li>
<li><a href="#trunkSourceWTFwtfeflWorkQueueEflcpp">trunk/Source/WTF/wtf/efl/WorkQueueEfl.cpp</a></li>
<li><a href="#trunkSourceWTFwtfgtkWorkQueueGtkcpp">trunk/Source/WTF/wtf/gtk/WorkQueueGtk.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2PlatformWorkQueuecpp">trunk/Source/WebKit2/Platform/WorkQueue.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformWorkQueueh">trunk/Source/WebKit2/Platform/WorkQueue.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformeflWorkQueueEflcpp">trunk/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformgtkWorkQueueGtkcpp">trunk/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformmacWorkQueueMaccpp">trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WTF/ChangeLog        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-02-20 Antti Koivisto <antti@apple.com>
+
+ Move WorkQueue from WK2 to WTF
+ https://bugs.webkit.org/show_bug.cgi?id=141797
+
+ Reviewed by Anders Carlsson.
+
+ It may be useful in WebCore.
+
+ Windows implementation is still missing.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/CMakeLists.txt:
+ * wtf/PlatformGTK.cmake:
+ * wtf/WorkQueue.cpp: Copied from Source/WebKit2/Platform/WorkQueue.cpp.
+ * wtf/WorkQueue.h: Copied from Source/WebKit2/Platform/WorkQueue.h.
+ * wtf/cocoa: Added.
+ * wtf/cocoa/WorkQueueCocoa.cpp: Copied from Source/WebKit2/Platform/mac/WorkQueueMac.cpp.
+ * wtf/efl/WorkQueueEfl.cpp: Copied from Source/WebKit2/Platform/efl/WorkQueueEfl.cpp.
+ * wtf/gtk/WorkQueueGtk.cpp: Copied from Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp.
+
</ins><span class="cx"> 2015-02-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL] Enable bmalloc for EFL port
</span></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -282,6 +282,9 @@
</span><span class="cx">                 CE73E02519DCB7AB00580D5C /* XPCSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE73E02419DCB7AB00580D5C /* XPCSPI.h */; };
</span><span class="cx">                 E15556F518A0CC18006F48FB /* CryptographicUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15556F318A0CC18006F48FB /* CryptographicUtilities.cpp */; };
</span><span class="cx">                 E15556F618A0CC18006F48FB /* CryptographicUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = E15556F418A0CC18006F48FB /* CryptographicUtilities.h */; };
</span><ins>+                E4A0AD391A96245500536DF6 /* WorkQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4A0AD371A96245500536DF6 /* WorkQueue.cpp */; };
+                E4A0AD3A1A96245500536DF6 /* WorkQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = E4A0AD381A96245500536DF6 /* WorkQueue.h */; };
+                E4A0AD3D1A96253C00536DF6 /* WorkQueueCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4A0AD3C1A96253C00536DF6 /* WorkQueueCocoa.cpp */; };
</ins><span class="cx">                 EB95E1F0161A72410089A2F5 /* ByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = EB95E1EF161A72410089A2F5 /* ByteOrder.h */; };
</span><span class="cx">                 FEDACD3D1630F83F00C69634 /* StackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDACD3B1630F83F00C69634 /* StackStats.cpp */; };
</span><span class="cx">                 FEDACD3E1630F83F00C69634 /* StackStats.h in Headers */ = {isa = PBXBuildFile; fileRef = FEDACD3C1630F83F00C69634 /* StackStats.h */; };
</span><span class="lines">@@ -578,6 +581,9 @@
</span><span class="cx">                 CE73E02419DCB7AB00580D5C /* XPCSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCSPI.h; sourceTree = "<group>"; };
</span><span class="cx">                 E15556F318A0CC18006F48FB /* CryptographicUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptographicUtilities.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 E15556F418A0CC18006F48FB /* CryptographicUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptographicUtilities.h; sourceTree = "<group>"; };
</span><ins>+                E4A0AD371A96245500536DF6 /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = "<group>"; };
+                E4A0AD381A96245500536DF6 /* WorkQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkQueue.h; sourceTree = "<group>"; };
+                E4A0AD3C1A96253C00536DF6 /* WorkQueueCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueueCocoa.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 EB95E1EF161A72410089A2F5 /* ByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteOrder.h; sourceTree = "<group>"; };
</span><span class="cx">                 FEDACD3B1630F83F00C69634 /* StackStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StackStats.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 FEDACD3C1630F83F00C69634 /* StackStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackStats.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -698,6 +704,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 2CDED0F018115C3F004DBA70 /* cf */,
</span><ins>+                                E4A0AD3B1A96251900536DF6 /* cocoa */,
</ins><span class="cx">                                 A8A47281151A825A004123FF /* dtoa */,
</span><span class="cx">                                 1FA47C87152502DA00568D1B /* ios */,
</span><span class="cx">                                 A8A472C4151A825A004123FF /* mac */,
</span><span class="lines">@@ -896,6 +903,8 @@
</span><span class="cx">                                 A8A47371151A825B004123FF /* VectorTraits.h */,
</span><span class="cx">                                 A8A47372151A825B004123FF /* VMTags.h */,
</span><span class="cx">                                 974CFC8D16A4F327006D5404 /* WeakPtr.h */,
</span><ins>+                                E4A0AD371A96245500536DF6 /* WorkQueue.cpp */,
+                                E4A0AD381A96245500536DF6 /* WorkQueue.h */,
</ins><span class="cx">                                 A8A4737A151A825B004123FF /* WTFThreadData.cpp */,
</span><span class="cx">                                 A8A4737B151A825B004123FF /* WTFThreadData.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -1031,6 +1040,14 @@
</span><span class="cx">                         path = spi;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="cx">                 };
</span><ins>+                E4A0AD3B1A96251900536DF6 /* cocoa */ = {
+                        isa = PBXGroup;
+                        children = (
+                                E4A0AD3C1A96253C00536DF6 /* WorkQueueCocoa.cpp */,
+                        );
+                        path = cocoa;
+                        sourceTree = "<group>";
+                };
</ins><span class="cx"> /* End PBXGroup section */
</span><span class="cx">
</span><span class="cx"> /* Begin PBXHeadersBuildPhase section */
</span><span class="lines">@@ -1221,6 +1238,7 @@
</span><span class="cx">                                 A8A4747F151A825B004123FF /* VectorTraits.h in Headers */,
</span><span class="cx">                                 A8A47480151A825B004123FF /* VMTags.h in Headers */,
</span><span class="cx">                                 974CFC8E16A4F327006D5404 /* WeakPtr.h in Headers */,
</span><ins>+                                E4A0AD3A1A96245500536DF6 /* WorkQueue.h in Headers */,
</ins><span class="cx">                                 1FA47C8B152502DA00568D1B /* WebCoreThread.h in Headers */,
</span><span class="cx">                                 A8A47446151A825B004123FF /* WTFString.h in Headers */,
</span><span class="cx">                                 A8A47487151A825B004123FF /* WTFThreadData.h in Headers */,
</span><span class="lines">@@ -1350,6 +1368,7 @@
</span><span class="cx">                                 A8A473B0151A825B004123FF /* double-conversion.cc in Sources */,
</span><span class="cx">                                 A8A473BA151A825B004123FF /* dtoa.cpp in Sources */,
</span><span class="cx">                                 0F885E0F1845AEA900F1E3FA /* FastBitVector.cpp in Sources */,
</span><ins>+                                E4A0AD3D1A96253C00536DF6 /* WorkQueueCocoa.cpp in Sources */,
</ins><span class="cx">                                 A8A473B3151A825B004123FF /* fast-dtoa.cc in Sources */,
</span><span class="cx">                                 A8A473C3151A825B004123FF /* FastMalloc.cpp in Sources */,
</span><span class="cx">                                 A5BA15FA182435A600A82E69 /* AtomicStringCF.cpp in Sources */,
</span><span class="lines">@@ -1378,6 +1397,7 @@
</span><span class="cx">                                 2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */,
</span><span class="cx">                                 1469419316EAAF6D0024E146 /* RunLoopTimerCF.cpp in Sources */,
</span><span class="cx">                                 A8A47421151A825B004123FF /* SHA1.cpp in Sources */,
</span><ins>+                                E4A0AD391A96245500536DF6 /* WorkQueue.cpp in Sources */,
</ins><span class="cx">                                 1469419916EAB0410024E146 /* SchedulePairCF.cpp in Sources */,
</span><span class="cx">                                 1469419716EAAFF80024E146 /* SchedulePairMac.mm in Sources */,
</span><span class="cx">                                 A748745217A0BDAE00FA04CB /* SixCharacterHash.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWTFwtfCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CMakeLists.txt (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CMakeLists.txt        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WTF/wtf/CMakeLists.txt        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -110,6 +110,7 @@
</span><span class="cx"> Vector.h
</span><span class="cx"> VectorTraits.h
</span><span class="cx"> WTFThreadData.h
</span><ins>+ WorkQueue.h
</ins><span class="cx"> WeakPtr.h
</span><span class="cx"> dtoa.h
</span><span class="cx">
</span><span class="lines">@@ -184,6 +185,7 @@
</span><span class="cx"> StringPrintStream.cpp
</span><span class="cx"> Threading.cpp
</span><span class="cx"> WTFThreadData.cpp
</span><ins>+ WorkQueue.cpp
</ins><span class="cx"> dtoa.cpp
</span><span class="cx">
</span><span class="cx"> dtoa/bignum-dtoa.cc
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/PlatformGTK.cmake (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/PlatformGTK.cmake        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WTF/wtf/PlatformGTK.cmake        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -6,6 +6,7 @@
</span><span class="cx">
</span><span class="cx"> gtk/MainThreadGtk.cpp
</span><span class="cx"> gtk/RunLoopGtk.cpp
</span><ins>+ gtk/WorkQueueGtk.cpp
</ins><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> list(APPEND WTF_LIBRARIES
</span></span></pre></div>
<a id="trunkSourceWTFwtfWorkQueuecppfromrev180409trunkSourceWebKit2PlatformWorkQueuecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WTF/wtf/WorkQueue.cpp (from rev 180409, trunk/Source/WebKit2/Platform/WorkQueue.cpp) (0 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/WorkQueue.cpp         (rev 0)
+++ trunk/Source/WTF/wtf/WorkQueue.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkQueue.h"
+
+namespace WTF {
+
+Ref<WorkQueue> WorkQueue::create(const char* name, Type type, QOS qos)
+{
+ return adoptRef(*new WorkQueue(name, type, qos));
+}
+
+WorkQueue::WorkQueue(const char* name, Type type, QOS qos)
+{
+ platformInitialize(name, type, qos);
+}
+
+WorkQueue::~WorkQueue()
+{
+ platformInvalidate();
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWTFwtfWorkQueuehfromrev180409trunkSourceWebKit2PlatformWorkQueueh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WTF/wtf/WorkQueue.h (from rev 180409, trunk/Source/WebKit2/Platform/WorkQueue.h) (0 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/WorkQueue.h         (rev 0)
+++ trunk/Source/WTF/wtf/WorkQueue.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -0,0 +1,105 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkQueue_h
+#define WorkQueue_h
+
+#include <chrono>
+#include <functional>
+#include <wtf/Forward.h>
+#include <wtf/FunctionDispatcher.h>
+#include <wtf/Functional.h>
+#include <wtf/RefCounted.h>
+#include <wtf/Threading.h>
+
+#if OS(DARWIN)
+#include <dispatch/dispatch.h>
+#endif
+
+#if PLATFORM(GTK)
+#include <wtf/gobject/GMainLoopSource.h>
+#include <wtf/gobject/GRefPtr.h>
+#elif PLATFORM(EFL)
+#include <DispatchQueueEfl.h>
+#endif
+
+namespace WTF {
+
+class WorkQueue final : public FunctionDispatcher {
+public:
+ enum class Type {
+ Serial,
+ Concurrent
+ };
+ enum class QOS {
+ UserInteractive,
+ UserInitiated,
+ Default,
+ Utility,
+ Background
+ };
+
+ WTF_EXPORT_PRIVATE static Ref<WorkQueue> create(const char* name, Type = Type::Serial, QOS = QOS::Default);
+ virtual ~WorkQueue();
+
+ WTF_EXPORT_PRIVATE virtual void dispatch(std::function<void ()>) override;
+ WTF_EXPORT_PRIVATE void dispatchAfter(std::chrono::nanoseconds, std::function<void ()>);
+
+#if OS(DARWIN)
+ dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
+#elif PLATFORM(GTK)
+ void registerSocketEventHandler(int, std::function<void ()>, std::function<void ()>);
+ void unregisterSocketEventHandler(int);
+#elif PLATFORM(EFL)
+ void registerSocketEventHandler(int, std::function<void ()>);
+ void unregisterSocketEventHandler(int);
+#endif
+
+private:
+ explicit WorkQueue(const char* name, Type, QOS);
+
+ void platformInitialize(const char* name, Type, QOS);
+ void platformInvalidate();
+
+#if OS(DARWIN)
+ static void executeFunction(void*);
+ dispatch_queue_t m_dispatchQueue;
+#elif PLATFORM(GTK)
+ ThreadIdentifier m_workQueueThread;
+ GRefPtr<GMainContext> m_eventContext;
+ Mutex m_eventLoopLock;
+ GRefPtr<GMainLoop> m_eventLoop;
+ GMainLoopSource m_socketEventSource;
+#elif PLATFORM(EFL)
+ RefPtr<DispatchQueue> m_dispatchQueue;
+#endif
+};
+
+}
+
+using WTF::WorkQueue;
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWTFwtfcocoaWorkQueueCocoacppfromrev180409trunkSourceWebKit2PlatformmacWorkQueueMaccpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp (from rev 180409, trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp) (0 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp         (rev 0)
+++ trunk/Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkQueue.h"
+
+namespace WTF {
+
+void WorkQueue::dispatch(std::function<void ()> function)
+{
+ ref();
+ dispatch_async(m_dispatchQueue, ^{
+ function();
+ deref();
+ });
+}
+
+void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<void ()> function)
+{
+ ref();
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, duration.count()), m_dispatchQueue, ^{
+ function();
+ deref();
+ });
+}
+
+#if HAVE(QOS_CLASSES)
+static dispatch_qos_class_t dispatchQOSClass(WorkQueue::QOS qos)
+{
+ switch (qos) {
+ case WorkQueue::QOS::UserInteractive:
+ return QOS_CLASS_USER_INTERACTIVE;
+ case WorkQueue::QOS::UserInitiated:
+ return QOS_CLASS_USER_INITIATED;
+ case WorkQueue::QOS::Default:
+ return QOS_CLASS_DEFAULT;
+ case WorkQueue::QOS::Utility:
+ return QOS_CLASS_UTILITY;
+ case WorkQueue::QOS::Background:
+ return QOS_CLASS_BACKGROUND;
+ }
+}
+#endif
+
+void WorkQueue::platformInitialize(const char* name, Type type, QOS qos)
+{
+ dispatch_queue_attr_t attr = type == Type::Concurrent ? DISPATCH_QUEUE_CONCURRENT : DISPATCH_QUEUE_SERIAL;
+#if HAVE(QOS_CLASSES)
+ attr = dispatch_queue_attr_make_with_qos_class(attr, dispatchQOSClass(qos), 0);
+#else
+ UNUSED_PARAM(qos);
+#endif
+ m_dispatchQueue = dispatch_queue_create(name, attr);
+ dispatch_set_context(m_dispatchQueue, this);
+}
+
+void WorkQueue::platformInvalidate()
+{
+ dispatch_release(m_dispatchQueue);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWTFwtfeflWorkQueueEflcppfromrev180409trunkSourceWebKit2PlatformeflWorkQueueEflcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WTF/wtf/efl/WorkQueueEfl.cpp (from rev 180409, trunk/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp) (0 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/efl/WorkQueueEfl.cpp         (rev 0)
+++ trunk/Source/WTF/wtf/efl/WorkQueueEfl.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ Copyright (C) 2012 Samsung Electronics
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "WorkQueue.h"
+
+#include <DispatchQueueEfl.h>
+#include <DispatchQueueWorkItemEfl.h>
+
+void WorkQueue::platformInitialize(const char* name, Type, QOS)
+{
+ m_dispatchQueue = DispatchQueue::create(name);
+}
+
+void WorkQueue::platformInvalidate()
+{
+ RefPtr<DispatchQueue> dispatchQueue = m_dispatchQueue.release();
+ dispatchQueue->stopThread();
+}
+
+void WorkQueue::registerSocketEventHandler(int fileDescriptor, std::function<void ()> function)
+{
+ if (!m_dispatchQueue)
+ return;
+
+ m_dispatchQueue->setSocketEventHandler(fileDescriptor, WTF::move(function));
+}
+
+void WorkQueue::unregisterSocketEventHandler(int fileDescriptor)
+{
+ UNUSED_PARAM(fileDescriptor);
+
+ if (!m_dispatchQueue)
+ return;
+
+ m_dispatchQueue->clearSocketEventHandler();
+}
+
+void WorkQueue::dispatch(std::function<void ()> function)
+{
+ if (!m_dispatchQueue)
+ return;
+
+ m_dispatchQueue->dispatch(WorkItem::create(this, WTF::move(function)));
+}
+
+void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<void ()> function)
+{
+ if (!m_dispatchQueue)
+ return;
+
+ m_dispatchQueue->dispatch(TimerWorkItem::create(this, WTF::move(function), duration));
+}
</ins></span></pre></div>
<a id="trunkSourceWTFwtfgtkWorkQueueGtkcppfromrev180409trunkSourceWebKit2PlatformgtkWorkQueueGtkcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WTF/wtf/gtk/WorkQueueGtk.cpp (from rev 180409, trunk/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp) (0 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/gtk/WorkQueueGtk.cpp         (rev 0)
+++ trunk/Source/WTF/wtf/gtk/WorkQueueGtk.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -0,0 +1,120 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkQueue.h"
+
+#include <gio/gio.h>
+#include <string.h>
+
+namespace WTF {
+
+static const size_t kVisualStudioThreadNameLimit = 31;
+
+void WorkQueue::platformInitialize(const char* name, Type, QOS)
+{
+ m_eventContext = adoptGRef(g_main_context_new());
+ ASSERT(m_eventContext);
+ m_eventLoop = adoptGRef(g_main_loop_new(m_eventContext.get(), FALSE));
+ ASSERT(m_eventLoop);
+
+ // This name can be com.apple.WebKit.ProcessLauncher or com.apple.CoreIPC.ReceiveQueue.
+ // We are using those names for the thread name, but both are longer than 31 characters,
+ // which is the limit of Visual Studio for thread names.
+ // When log is enabled createThread() will assert instead of truncate the name, so we need
+ // to make sure we don't use a name longer than 31 characters.
+ const char* threadName = g_strrstr(name, ".");
+ if (threadName)
+ threadName++;
+ else
+ threadName = name;
+ if (strlen(threadName) > kVisualStudioThreadNameLimit)
+ threadName += strlen(threadName) - kVisualStudioThreadNameLimit;
+
+ RefPtr<WorkQueue> protector(this);
+ m_workQueueThread = createThread(threadName, [protector] { g_main_loop_run(protector->m_eventLoop.get()); });
+}
+
+void WorkQueue::platformInvalidate()
+{
+ if (m_workQueueThread) {
+ detachThread(m_workQueueThread);
+ m_workQueueThread = 0;
+ }
+
+ MutexLocker locker(m_eventLoopLock);
+ if (m_eventLoop) {
+ if (g_main_loop_is_running(m_eventLoop.get()))
+ g_main_loop_quit(m_eventLoop.get());
+ m_eventLoop.clear();
+ }
+
+ m_eventContext.clear();
+}
+
+void WorkQueue::registerSocketEventHandler(int fileDescriptor, std::function<void ()> function, std::function<void ()> closeFunction)
+{
+ GRefPtr<GSocket> socket = adoptGRef(g_socket_new_from_fd(fileDescriptor, 0));
+ ref();
+ m_socketEventSource.schedule("[WebKit] WorkQueue::SocketEventHandler", [function, closeFunction](GIOCondition condition) {
+ if (condition & G_IO_HUP || condition & G_IO_ERR || condition & G_IO_NVAL) {
+ closeFunction();
+ return GMainLoopSource::Stop;
+ }
+
+ if (condition & G_IO_IN) {
+ function();
+ return GMainLoopSource::Continue;
+ }
+
+ ASSERT_NOT_REACHED();
+ return GMainLoopSource::Stop;
+ }, socket.get(), G_IO_IN,
+ [this] { deref(); },
+ m_eventContext.get());
+}
+
+void WorkQueue::unregisterSocketEventHandler(int)
+{
+ m_socketEventSource.cancel();
+}
+
+void WorkQueue::dispatch(std::function<void ()> function)
+{
+ ref();
+ GMainLoopSource::scheduleAndDeleteOnDestroy("[WebKit] WorkQueue::dispatch", WTF::move(function), G_PRIORITY_DEFAULT,
+ [this] { deref(); }, m_eventContext.get());
+}
+
+void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<void ()> function)
+{
+ ref();
+ GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy("[WebKit] WorkQueue::dispatchAfter", WTF::move(function),
+ std::chrono::duration_cast<std::chrono::milliseconds>(duration), G_PRIORITY_DEFAULT, [this] { deref(); }, m_eventContext.get());
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/CMakeLists.txt        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -181,7 +181,6 @@
</span><span class="cx">
</span><span class="cx"> Platform/Logging.cpp
</span><span class="cx"> Platform/Module.cpp
</span><del>- Platform/WorkQueue.cpp
</del><span class="cx">
</span><span class="cx"> Platform/IPC/ArgumentCoders.cpp
</span><span class="cx"> Platform/IPC/ArgumentDecoder.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/ChangeLog        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-02-20 Antti Koivisto <antti@apple.com>
+
+ Move WorkQueue from WK2 to WTF
+ https://bugs.webkit.org/show_bug.cgi?id=141797
+
+ Reviewed by Anders Carlsson.
+
+ * CMakeLists.txt:
+ * DatabaseProcess/DatabaseProcess.h:
+ * Platform/IPC/Connection.h:
+ * Platform/WorkQueue.cpp: Removed.
+ * Platform/WorkQueue.h: Removed.
+ * Platform/efl/WorkQueueEfl.cpp: Removed.
+ * Platform/gtk/WorkQueueGtk.cpp: Removed.
+ * Platform/mac/WorkQueueMac.cpp: Removed.
+ * PlatformEfl.cmake:
+ * PlatformGTK.cmake:
+ * Shared/Network/CustomProtocols/CustomProtocolManager.h:
+ * UIProcess/Launcher/ProcessLauncher.cpp:
+ * UIProcess/Storage/LocalStorageDatabase.cpp:
+ * UIProcess/Storage/LocalStorageDatabase.h:
+ * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
+ * UIProcess/Storage/LocalStorageDatabaseTracker.h:
+ * UIProcess/Storage/StorageManager.cpp:
+ * UIProcess/Storage/StorageManager.h:
+ * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2015-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [WK2][GTK] Fix the build after r180362
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessDatabaseProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -33,8 +33,6 @@
</span><span class="cx"> #include "WebOriginDataManagerSupplement.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><del>-class WorkQueue;
-
</del><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class AsyncTask;
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Connection.h (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Connection.h        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -33,11 +33,12 @@
</span><span class="cx"> #include "MessageEncoder.h"
</span><span class="cx"> #include "MessageReceiver.h"
</span><span class="cx"> #include "ProcessType.h"
</span><del>-#include "WorkQueue.h"
</del><span class="cx"> #include <atomic>
</span><span class="cx"> #include <condition_variable>
</span><span class="cx"> #include <wtf/Deque.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><ins>+#include <wtf/HashMap.h>
+#include <wtf/WorkQueue.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="cx"> #if OS(DARWIN)
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformWorkQueuecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/WorkQueue.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/WorkQueue.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/Platform/WorkQueue.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WorkQueue.h"
-
-Ref<WorkQueue> WorkQueue::create(const char* name, Type type, QOS qos)
-{
- return adoptRef(*new WorkQueue(name, type, qos));
-}
-
-WorkQueue::WorkQueue(const char* name, Type type, QOS qos)
-{
- platformInitialize(name, type, qos);
-}
-
-WorkQueue::~WorkQueue()
-{
- platformInvalidate();
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformWorkQueueh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/WorkQueue.h (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/WorkQueue.h        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/Platform/WorkQueue.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1,105 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WorkQueue_h
-#define WorkQueue_h
-
-#if OS(DARWIN)
-#include <dispatch/dispatch.h>
-#endif
-
-#include <chrono>
-#include <functional>
-#include <wtf/Forward.h>
-#include <wtf/FunctionDispatcher.h>
-#include <wtf/Functional.h>
-#include <wtf/HashMap.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Threading.h>
-#include <wtf/Vector.h>
-
-#if PLATFORM(GTK) || PLATFORM(EFL)
-#include "PlatformProcessIdentifier.h"
-#endif
-
-#if PLATFORM(GTK)
-#include <wtf/gobject/GMainLoopSource.h>
-#include <wtf/gobject/GRefPtr.h>
-#elif PLATFORM(EFL)
-#include <DispatchQueueEfl.h>
-#endif
-
-class WorkQueue final : public FunctionDispatcher {
-public:
- enum class Type {
- Serial,
- Concurrent
- };
- enum class QOS {
- UserInteractive,
- UserInitiated,
- Default,
- Utility,
- Background
- };
-
- static Ref<WorkQueue> create(const char* name, Type = Type::Serial, QOS = QOS::Default);
- virtual ~WorkQueue();
-
- virtual void dispatch(std::function<void ()>) override;
- void dispatchAfter(std::chrono::nanoseconds, std::function<void ()>);
-
-#if OS(DARWIN)
- dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
-#elif PLATFORM(GTK)
- void registerSocketEventHandler(int, std::function<void ()>, std::function<void ()>);
- void unregisterSocketEventHandler(int);
-#elif PLATFORM(EFL)
- void registerSocketEventHandler(int, std::function<void ()>);
- void unregisterSocketEventHandler(int);
-#endif
-
-private:
- explicit WorkQueue(const char* name, Type, QOS);
-
- void platformInitialize(const char* name, Type, QOS);
- void platformInvalidate();
-
-#if OS(DARWIN)
- static void executeFunction(void*);
- dispatch_queue_t m_dispatchQueue;
-#elif PLATFORM(GTK)
- ThreadIdentifier m_workQueueThread;
- GRefPtr<GMainContext> m_eventContext;
- Mutex m_eventLoopLock;
- GRefPtr<GMainLoop> m_eventLoop;
- GMainLoopSource m_socketEventSource;
-#elif PLATFORM(EFL)
- RefPtr<DispatchQueue> m_dispatchQueue;
-#endif
-};
-
-#endif // WorkQueue_h
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformeflWorkQueueEflcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-/*
- Copyright (C) 2012 Samsung Electronics
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "WorkQueue.h"
-
-#include <DispatchQueueEfl.h>
-#include <DispatchQueueWorkItemEfl.h>
-
-void WorkQueue::platformInitialize(const char* name, Type, QOS)
-{
- m_dispatchQueue = DispatchQueue::create(name);
-}
-
-void WorkQueue::platformInvalidate()
-{
- RefPtr<DispatchQueue> dispatchQueue = m_dispatchQueue.release();
- dispatchQueue->stopThread();
-}
-
-void WorkQueue::registerSocketEventHandler(int fileDescriptor, std::function<void ()> function)
-{
- if (!m_dispatchQueue)
- return;
-
- m_dispatchQueue->setSocketEventHandler(fileDescriptor, WTF::move(function));
-}
-
-void WorkQueue::unregisterSocketEventHandler(int fileDescriptor)
-{
- UNUSED_PARAM(fileDescriptor);
-
- if (!m_dispatchQueue)
- return;
-
- m_dispatchQueue->clearSocketEventHandler();
-}
-
-void WorkQueue::dispatch(std::function<void ()> function)
-{
- if (!m_dispatchQueue)
- return;
-
- m_dispatchQueue->dispatch(WorkItem::create(this, WTF::move(function)));
-}
-
-void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<void ()> function)
-{
- if (!m_dispatchQueue)
- return;
-
- m_dispatchQueue->dispatch(TimerWorkItem::create(this, WTF::move(function), duration));
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformgtkWorkQueueGtkcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1,115 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WorkQueue.h"
-
-#include <gio/gio.h>
-
-static const size_t kVisualStudioThreadNameLimit = 31;
-
-void WorkQueue::platformInitialize(const char* name, Type, QOS)
-{
- m_eventContext = adoptGRef(g_main_context_new());
- ASSERT(m_eventContext);
- m_eventLoop = adoptGRef(g_main_loop_new(m_eventContext.get(), FALSE));
- ASSERT(m_eventLoop);
-
- // This name can be com.apple.WebKit.ProcessLauncher or com.apple.CoreIPC.ReceiveQueue.
- // We are using those names for the thread name, but both are longer than 31 characters,
- // which is the limit of Visual Studio for thread names.
- // When log is enabled createThread() will assert instead of truncate the name, so we need
- // to make sure we don't use a name longer than 31 characters.
- const char* threadName = g_strrstr(name, ".");
- if (threadName)
- threadName++;
- else
- threadName = name;
- if (strlen(threadName) > kVisualStudioThreadNameLimit)
- threadName += strlen(threadName) - kVisualStudioThreadNameLimit;
-
- RefPtr<WorkQueue> protector(this);
- m_workQueueThread = createThread(threadName, [protector] { g_main_loop_run(protector->m_eventLoop.get()); });
-}
-
-void WorkQueue::platformInvalidate()
-{
- if (m_workQueueThread) {
- detachThread(m_workQueueThread);
- m_workQueueThread = 0;
- }
-
- MutexLocker locker(m_eventLoopLock);
- if (m_eventLoop) {
- if (g_main_loop_is_running(m_eventLoop.get()))
- g_main_loop_quit(m_eventLoop.get());
- m_eventLoop.clear();
- }
-
- m_eventContext.clear();
-}
-
-void WorkQueue::registerSocketEventHandler(int fileDescriptor, std::function<void ()> function, std::function<void ()> closeFunction)
-{
- GRefPtr<GSocket> socket = adoptGRef(g_socket_new_from_fd(fileDescriptor, 0));
- ref();
- m_socketEventSource.schedule("[WebKit] WorkQueue::SocketEventHandler", [function, closeFunction](GIOCondition condition) {
- if (condition & G_IO_HUP || condition & G_IO_ERR || condition & G_IO_NVAL) {
- closeFunction();
- return GMainLoopSource::Stop;
- }
-
- if (condition & G_IO_IN) {
- function();
- return GMainLoopSource::Continue;
- }
-
- ASSERT_NOT_REACHED();
- return GMainLoopSource::Stop;
- }, socket.get(), G_IO_IN,
- [this] { deref(); },
- m_eventContext.get());
-}
-
-void WorkQueue::unregisterSocketEventHandler(int)
-{
- m_socketEventSource.cancel();
-}
-
-void WorkQueue::dispatch(std::function<void ()> function)
-{
- ref();
- GMainLoopSource::scheduleAndDeleteOnDestroy("[WebKit] WorkQueue::dispatch", WTF::move(function), G_PRIORITY_DEFAULT,
- [this] { deref(); }, m_eventContext.get());
-}
-
-void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<void ()> function)
-{
- ref();
- GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy("[WebKit] WorkQueue::dispatchAfter", WTF::move(function),
- std::chrono::duration_cast<std::chrono::milliseconds>(duration), G_PRIORITY_DEFAULT, [this] { deref(); }, m_eventContext.get());
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformmacWorkQueueMaccpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1,78 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WorkQueue.h"
-
-void WorkQueue::dispatch(std::function<void ()> function)
-{
- ref();
- dispatch_async(m_dispatchQueue, ^{
- function();
- deref();
- });
-}
-
-void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<void ()> function)
-{
- ref();
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, duration.count()), m_dispatchQueue, ^{
- function();
- deref();
- });
-}
-
-#if HAVE(QOS_CLASSES)
-static dispatch_qos_class_t dispatchQOSClass(WorkQueue::QOS qos)
-{
- switch (qos) {
- case WorkQueue::QOS::UserInteractive:
- return QOS_CLASS_USER_INTERACTIVE;
- case WorkQueue::QOS::UserInitiated:
- return QOS_CLASS_USER_INITIATED;
- case WorkQueue::QOS::Default:
- return QOS_CLASS_DEFAULT;
- case WorkQueue::QOS::Utility:
- return QOS_CLASS_UTILITY;
- case WorkQueue::QOS::Background:
- return QOS_CLASS_BACKGROUND;
- }
-}
-#endif
-
-void WorkQueue::platformInitialize(const char* name, Type type, QOS qos)
-{
- dispatch_queue_attr_t attr = type == Type::Concurrent ? DISPATCH_QUEUE_CONCURRENT : DISPATCH_QUEUE_SERIAL;
-#if HAVE(QOS_CLASSES)
- attr = dispatch_queue_attr_make_with_qos_class(attr, dispatchQOSClass(qos), 0);
-#endif
- m_dispatchQueue = dispatch_queue_create(name, attr);
- dispatch_set_context(m_dispatchQueue, this);
-}
-
-void WorkQueue::platformInvalidate()
-{
- dispatch_release(m_dispatchQueue);
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformEfl.cmake (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformEfl.cmake        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/PlatformEfl.cmake        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -11,7 +11,6 @@
</span><span class="cx"> Platform/efl/DispatchQueueEfl.cpp
</span><span class="cx"> Platform/efl/LoggingEfl.cpp
</span><span class="cx"> Platform/efl/ModuleEfl.cpp
</span><del>- Platform/efl/WorkQueueEfl.cpp
</del><span class="cx">
</span><span class="cx"> Platform/unix/SharedMemoryUnix.cpp
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx">
</span><span class="cx"> Platform/gtk/LoggingGtk.cpp
</span><span class="cx"> Platform/gtk/ModuleGtk.cpp
</span><del>- Platform/gtk/WorkQueueGtk.cpp
</del><span class="cx">
</span><span class="cx"> Platform/unix/SharedMemoryUnix.cpp
</span><span class="cx">
</span><span class="lines">@@ -624,7 +623,6 @@
</span><span class="cx"> list(APPEND PluginProcessGTK2_SOURCES
</span><span class="cx"> Platform/Logging.cpp
</span><span class="cx"> Platform/Module.cpp
</span><del>- Platform/WorkQueue.cpp
</del><span class="cx">
</span><span class="cx"> Platform/IPC/ArgumentCoders.cpp
</span><span class="cx"> Platform/IPC/ArgumentDecoder.cpp
</span><span class="lines">@@ -643,7 +641,6 @@
</span><span class="cx">
</span><span class="cx"> Platform/gtk/LoggingGtk.cpp
</span><span class="cx"> Platform/gtk/ModuleGtk.cpp
</span><del>- Platform/gtk/WorkQueueGtk.cpp
</del><span class="cx">
</span><span class="cx"> Platform/unix/SharedMemoryUnix.cpp
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNetworkCustomProtocolsCustomProtocolManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "Connection.h"
</span><span class="cx"> #include "NetworkProcessSupplement.h"
</span><span class="cx"> #include "WebProcessSupplement.h"
</span><del>-#include "WorkQueue.h"
</del><ins>+#include <wtf/WorkQueue.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLauncherProcessLaunchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "ProcessLauncher.h"
</span><span class="cx">
</span><del>-#include "WorkQueue.h"
-#include <wtf/StdLibExtras.h>
</del><ins>+#include <wtf/StdLibExtras.h>
+#include <wtf/WorkQueue.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageLocalStorageDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #include "LocalStorageDatabase.h"
</span><span class="cx">
</span><span class="cx"> #include "LocalStorageDatabaseTracker.h"
</span><del>-#include "WorkQueue.h"
</del><span class="cx"> #include <WebCore/FileSystem.h>
</span><span class="cx"> #include <WebCore/SQLiteStatement.h>
</span><span class="cx"> #include <WebCore/SQLiteTransaction.h>
</span><span class="lines">@@ -35,6 +34,7 @@
</span><span class="cx"> #include <WebCore/StorageMap.h>
</span><span class="cx"> #include <WebCore/SuddenTermination.h>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><ins>+#include <wtf/WorkQueue.h>
</ins><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageLocalStorageDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.h (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.h        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -31,9 +31,8 @@
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/ThreadSafeRefCounted.h>
</span><ins>+#include <wtf/WorkQueue.h>
</ins><span class="cx">
</span><del>-class WorkQueue;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> class SecurityOrigin;
</span><span class="cx"> class StorageMap;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageLocalStorageDatabaseTrackercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -27,11 +27,11 @@
</span><span class="cx"> #include "LocalStorageDatabaseTracker.h"
</span><span class="cx">
</span><span class="cx"> #include "LocalStorageDetails.h"
</span><del>-#include "WorkQueue.h"
</del><span class="cx"> #include <WebCore/FileSystem.h>
</span><span class="cx"> #include <WebCore/SQLiteStatement.h>
</span><span class="cx"> #include <WebCore/SecurityOrigin.h>
</span><span class="cx"> #include <WebCore/TextEncoding.h>
</span><ins>+#include <wtf/WorkQueue.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageLocalStorageDatabaseTrackerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/ThreadSafeRefCounted.h>
</span><ins>+#include <wtf/WorkQueue.h>
</ins><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -38,8 +39,6 @@
</span><span class="cx"> class SecurityOrigin;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-class WorkQueue;
-
</del><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> struct LocalStorageDetails;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageStorageManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -33,11 +33,11 @@
</span><span class="cx"> #include "StorageAreaMapMessages.h"
</span><span class="cx"> #include "StorageManagerMessages.h"
</span><span class="cx"> #include "WebProcessProxy.h"
</span><del>-#include "WorkQueue.h"
</del><span class="cx"> #include <WebCore/SecurityOriginHash.h>
</span><span class="cx"> #include <WebCore/StorageMap.h>
</span><span class="cx"> #include <WebCore/TextEncoding.h>
</span><span class="cx"> #include <memory>
</span><ins>+#include <wtf/WorkQueue.h>
</ins><span class="cx"> #include <wtf/threads/BinarySemaphore.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageStorageManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -32,8 +32,6 @@
</span><span class="cx"> #include <wtf/ThreadSafeRefCounted.h>
</span><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx">
</span><del>-class WorkQueue;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> class SecurityOrigin;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (180409 => 180410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-20 11:16:15 UTC (rev 180409)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-20 14:18:52 UTC (rev 180410)
</span><span class="lines">@@ -1224,7 +1224,6 @@
</span><span class="cx">                 B63403F914910D57001070B5 /* APIObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B63403F814910D57001070B5 /* APIObject.cpp */; };
</span><span class="cx">                 B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = B878B613133428DC006888E9 /* CorrectionPanel.h */; };
</span><span class="cx">                 B878B616133428DC006888E9 /* CorrectionPanel.mm in Sources */ = {isa = PBXBuildFile; fileRef = B878B614133428DC006888E9 /* CorrectionPanel.mm */; };
</span><del>-                BC0092F8115837A300E0AE2A /* WorkQueueMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0092F6115837A300E0AE2A /* WorkQueueMac.cpp */; };
</del><span class="cx">                 BC017D0716260FF4007054F5 /* WKDOMDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = BC017CFF16260FF4007054F5 /* WKDOMDocument.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BC017D0816260FF4007054F5 /* WKDOMDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC017D0016260FF4007054F5 /* WKDOMDocument.mm */; };
</span><span class="cx">                 BC017D0916260FF4007054F5 /* WKDOMElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC017D0116260FF4007054F5 /* WKDOMElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1323,8 +1322,6 @@
</span><span class="cx">                 BC2652171182608100243E12 /* DrawingAreaProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2652131182608100243E12 /* DrawingAreaProxy.h */; };
</span><span class="cx">                 BC2D021712AC41CB00E732A3 /* SameDocumentNavigationType.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2D021612AC41CB00E732A3 /* SameDocumentNavigationType.h */; };
</span><span class="cx">                 BC2D021912AC426C00E732A3 /* WKPageLoadTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2D021812AC426C00E732A3 /* WKPageLoadTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                BC2E6E8D1141971500A63B1E /* WorkQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2E6E7D1141970C00A63B1E /* WorkQueue.cpp */; };
-                BC2E6E8E1141971500A63B1E /* WorkQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2E6E7E1141970C00A63B1E /* WorkQueue.h */; };
</del><span class="cx">                 BC3065FA1259344E00E71278 /* CacheModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3065F91259344E00E71278 /* CacheModel.h */; };
</span><span class="cx">                 BC3066BE125A442100E71278 /* WebProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC3066BC125A442100E71278 /* WebProcessMessageReceiver.cpp */; };
</span><span class="cx">                 BC3066BF125A442100E71278 /* WebProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3066BD125A442100E71278 /* WebProcessMessages.h */; };
</span><span class="lines">@@ -3408,7 +3405,6 @@
</span><span class="cx">                 B63403F814910D57001070B5 /* APIObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIObject.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 B878B613133428DC006888E9 /* CorrectionPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CorrectionPanel.h; sourceTree = "<group>"; };
</span><span class="cx">                 B878B614133428DC006888E9 /* CorrectionPanel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CorrectionPanel.mm; sourceTree = "<group>"; };
</span><del>-                BC0092F6115837A300E0AE2A /* WorkQueueMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueueMac.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 BC017CFF16260FF4007054F5 /* WKDOMDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDOMDocument.h; sourceTree = "<group>"; };
</span><span class="cx">                 BC017D0016260FF4007054F5 /* WKDOMDocument.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKDOMDocument.mm; sourceTree = "<group>"; };
</span><span class="cx">                 BC017D0116260FF4007054F5 /* WKDOMElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDOMElement.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -3512,8 +3508,6 @@
</span><span class="cx">                 BC2652131182608100243E12 /* DrawingAreaProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaProxy.h; sourceTree = "<group>"; };
</span><span class="cx">                 BC2D021612AC41CB00E732A3 /* SameDocumentNavigationType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SameDocumentNavigationType.h; sourceTree = "<group>"; };
</span><span class="cx">                 BC2D021812AC426C00E732A3 /* WKPageLoadTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageLoadTypes.h; sourceTree = "<group>"; };
</span><del>-                BC2E6E7D1141970C00A63B1E /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = "<group>"; };
-                BC2E6E7E1141970C00A63B1E /* WorkQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkQueue.h; sourceTree = "<group>"; };
</del><span class="cx">                 BC3065F91259344E00E71278 /* CacheModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheModel.h; sourceTree = "<group>"; };
</span><span class="cx">                 BC3066B9125A436300E71278 /* WebProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebProcess.messages.in; sourceTree = "<group>"; };
</span><span class="cx">                 BC3066BC125A442100E71278 /* WebProcessMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -4561,7 +4555,6 @@
</span><span class="cx">                                 1A24BF39120896A600FBB059 /* SharedMemoryMac.cpp */,
</span><span class="cx">                                 296BD85B15019BC30071F424 /* StringUtilities.h */,
</span><span class="cx">                                 296BD85C15019BC30071F424 /* StringUtilities.mm */,
</span><del>-                                BC0092F6115837A300E0AE2A /* WorkQueueMac.cpp */,
</del><span class="cx">                         );
</span><span class="cx">                         path = mac;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -6612,8 +6605,6 @@
</span><span class="cx">                                 C0E3AA441209E2BA00A49D01 /* Module.h */,
</span><span class="cx">                                 BC8780FB1161C2B800CC2768 /* PlatformProcessIdentifier.h */,
</span><span class="cx">                                 1A24BED3120894D100FBB059 /* SharedMemory.h */,
</span><del>-                                BC2E6E7D1141970C00A63B1E /* WorkQueue.cpp */,
-                                BC2E6E7E1141970C00A63B1E /* WorkQueue.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = Platform;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -8300,7 +8291,6 @@
</span><span class="cx">                                 26F9A83B18A3468100AEB88A /* WKWebViewPrivate.h in Headers */,
</span><span class="cx">                                 1AD60F5E18E20F4C0020C034 /* WKWindowFeatures.h in Headers */,
</span><span class="cx">                                 1AD60F6018E20F740020C034 /* WKWindowFeaturesInternal.h in Headers */,
</span><del>-                                BC2E6E8E1141971500A63B1E /* WorkQueue.h in Headers */,
</del><span class="cx">                                 BCBECDE816B6416800047A1A /* XPCServiceEntryPoint.h in Headers */,
</span><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="lines">@@ -9987,8 +9977,6 @@
</span><span class="cx">                                 1ADF591A1890528E0043C145 /* WKWebViewConfiguration.mm in Sources */,
</span><span class="cx">                                 2DC6D9C418C44A610043BAD4 /* WKWebViewContentProviderRegistry.mm in Sources */,
</span><span class="cx">                                 1AD60F5D18E20F4C0020C034 /* WKWindowFeatures.mm in Sources */,
</span><del>-                                BC2E6E8D1141971500A63B1E /* WorkQueue.cpp in Sources */,
-                                BC0092F8115837A300E0AE2A /* WorkQueueMac.cpp in Sources */,
</del><span class="cx">                                 BCBECDE716B6416800047A1A /* XPCServiceEntryPoint.mm in Sources */,
</span><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span></span></pre>
</div>
</div>
</body>
</html>