Title: [156508] trunk/Source/WebKit2
Revision
156508
Author
[email protected]
Date
2013-09-26 15:45:46 -0700 (Thu, 26 Sep 2013)

Log Message

Remove Windows code
https://bugs.webkit.org/show_bug.cgi?id=121988

Reviewed by Antti Koivisto.

* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/win/ConnectionWin.cpp: Removed.
* Platform/SharedMemory.h:
* Platform/WorkQueue.h:
* Platform/win/SharedMemoryWin.cpp: Removed.
* Platform/win/WorkQueueWin.cpp: Removed.
* Shared/ChildProcess.cpp:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::loadPluginsIfNecessary):
* WebProcess/WebProcess.cpp:

Modified Paths

Removed Paths

  • trunk/Source/WebKit2/Platform/CoreIPC/win/
  • trunk/Source/WebKit2/Platform/win/

Diff

Modified: trunk/Source/WebKit2/ChangeLog (156507 => 156508)


--- trunk/Source/WebKit2/ChangeLog	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/ChangeLog	2013-09-26 22:45:46 UTC (rev 156508)
@@ -1,5 +1,25 @@
 2013-09-26  Anders Carlsson  <[email protected]>
 
+        Remove Windows code
+        https://bugs.webkit.org/show_bug.cgi?id=121988
+
+        Reviewed by Antti Koivisto.
+
+        * Platform/CoreIPC/Connection.h:
+        * Platform/CoreIPC/win/ConnectionWin.cpp: Removed.
+        * Platform/SharedMemory.h:
+        * Platform/WorkQueue.h:
+        * Platform/win/SharedMemoryWin.cpp: Removed.
+        * Platform/win/WorkQueueWin.cpp: Removed.
+        * Shared/ChildProcess.cpp:
+        * Shared/ChildProcessProxy.cpp:
+        (WebKit::ChildProcessProxy::didFinishLaunching):
+        * UIProcess/Plugins/PluginInfoStore.cpp:
+        (WebKit::PluginInfoStore::loadPluginsIfNecessary):
+        * WebProcess/WebProcess.cpp:
+
+2013-09-26  Anders Carlsson  <[email protected]>
+
         Stop using PassWeak
         https://bugs.webkit.org/show_bug.cgi?id=121968
 

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.h (156507 => 156508)


--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.h	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.h	2013-09-26 22:45:46 UTC (rev 156508)
@@ -126,10 +126,6 @@
 #endif
     };
     static bool identifierIsNull(Identifier identifier) { return identifier.port == MACH_PORT_NULL; }
-#elif OS(WINDOWS)
-    typedef HANDLE Identifier;
-    static bool createServerAndClientIdentifiers(Identifier& serverIdentifier, Identifier& clientIdentifier);
-    static bool identifierIsNull(Identifier identifier) { return !identifier; }
 #elif USE(UNIX_DOMAIN_SOCKETS)
     typedef int Identifier;
     static bool identifierIsNull(Identifier identifier) { return !identifier; }
@@ -312,23 +308,6 @@
     xpc_connection_t m_xpcConnection;
 #endif
 
-#elif OS(WINDOWS)
-    // Called on the connection queue.
-    void readEventHandler();
-    void writeEventHandler();
-
-    // Called by Connection::SyncMessageState::waitWhileDispatchingSentWin32Messages.
-    // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the
-    // same time zone as WTF::currentTime(). Dispatches sent (not posted) messages to the passed-in
-    // set of HWNDs until the semaphore is signaled or absoluteTime is reached. Returns true if the
-    // semaphore is signaled, false otherwise.
-    static bool dispatchSentMessagesUntil(const Vector<HWND>& windows, WTF::BinarySemaphore& semaphore, double absoluteTime);
-
-    Vector<uint8_t> m_readBuffer;
-    OVERLAPPED m_readState;
-    std::unique_ptr<MessageEncoder> m_pendingWriteEncoder;
-    OVERLAPPED m_writeState;
-    HANDLE m_connectionPipe;
 #elif USE(UNIX_DOMAIN_SOCKETS)
     // Called on the connection queue.
     void readyReadHandler();

Modified: trunk/Source/WebKit2/Platform/SharedMemory.h (156507 => 156508)


--- trunk/Source/WebKit2/Platform/SharedMemory.h	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/Platform/SharedMemory.h	2013-09-26 22:45:46 UTC (rev 156508)
@@ -68,8 +68,6 @@
         friend class SharedMemory;
 #if OS(DARWIN)
         mutable mach_port_t m_port;
-#elif OS(WINDOWS)
-        mutable HANDLE m_handle;
 #elif USE(UNIX_DOMAIN_SOCKETS)
         mutable int m_fileDescriptor;
 #endif
@@ -86,19 +84,12 @@
     // Will return 0 on failure.
     static PassRefPtr<SharedMemory> createFromVMBuffer(void*, size_t);
 
-#if OS(WINDOWS)
-    static PassRefPtr<SharedMemory> adopt(HANDLE, size_t, Protection);
-#endif
-
     ~SharedMemory();
 
     bool createHandle(Handle&, Protection);
 
     size_t size() const { return m_size; }
     void* data() const { return m_data; }
-#if OS(WINDOWS)
-    HANDLE handle() const { return m_handle; }
-#endif
 
     // Creates a copy-on-write copy of the first |size| bytes.
     PassRefPtr<SharedMemory> createCopyOnWriteCopy(size_t) const;
@@ -113,8 +104,6 @@
 
 #if OS(DARWIN)
     mach_port_t m_port;
-#elif OS(WINDOWS)
-    HANDLE m_handle;
 #elif USE(UNIX_DOMAIN_SOCKETS)
     int m_fileDescriptor;
 #endif

Modified: trunk/Source/WebKit2/Platform/WorkQueue.h (156507 => 156508)


--- trunk/Source/WebKit2/Platform/WorkQueue.h	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/Platform/WorkQueue.h	2013-09-26 22:45:46 UTC (rev 156508)
@@ -71,10 +71,6 @@
 
 #if OS(DARWIN)
     dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
-
-#elif OS(WINDOWS)
-    void registerHandle(HANDLE, const Function<void()>&);
-    void unregisterAndCloseHandle(HANDLE);
 #elif PLATFORM(QT)
     QSocketNotifier* registerSocketEventHandler(int, QSocketNotifier::Type, const Function<void()>&);
     void dispatchOnTermination(WebKit::PlatformProcessIdentifier, const Function<void()>&);
@@ -96,58 +92,6 @@
 #if OS(DARWIN)
     static void executeFunction(void*);
     dispatch_queue_t m_dispatchQueue;
-#elif OS(WINDOWS)
-    class WorkItemWin : public ThreadSafeRefCounted<WorkItemWin> {
-    public:
-        static PassRefPtr<WorkItemWin> create(const Function<void()>&, WorkQueue*);
-        virtual ~WorkItemWin();
-
-        Function<void()>& function() { return m_function; }
-        WorkQueue* queue() const { return m_queue.get(); }
-
-    protected:
-        WorkItemWin(const Function<void()>&, WorkQueue*);
-
-    private:
-        Function<void()> m_function;
-        RefPtr<WorkQueue> m_queue;
-    };
-
-    class HandleWorkItem : public WorkItemWin {
-    public:
-        static PassRefPtr<HandleWorkItem> createByAdoptingHandle(HANDLE, const Function<void()>&, WorkQueue*);
-        virtual ~HandleWorkItem();
-
-        void setWaitHandle(HANDLE waitHandle) { m_waitHandle = waitHandle; }
-        HANDLE waitHandle() const { return m_waitHandle; }
-
-    private:
-        HandleWorkItem(HANDLE, const Function<void()>&, WorkQueue*);
-
-        HANDLE m_handle;
-        HANDLE m_waitHandle;
-    };
-
-    static void CALLBACK handleCallback(void* context, BOOLEAN timerOrWaitFired);
-    static void CALLBACK timerCallback(void* context, BOOLEAN timerOrWaitFired);
-    static DWORD WINAPI workThreadCallback(void* context);
-
-    bool tryRegisterAsWorkThread();
-    void unregisterAsWorkThread();
-    void performWorkOnRegisteredWorkThread();
-
-    static void unregisterWaitAndDestroyItemSoon(PassRefPtr<HandleWorkItem>);
-    static DWORD WINAPI unregisterWaitAndDestroyItemCallback(void* context);
-
-    volatile LONG m_isWorkThreadRegistered;
-
-    Mutex m_workItemQueueLock;
-    Vector<RefPtr<WorkItemWin>> m_workItemQueue;
-
-    Mutex m_handlesLock;
-    HashMap<HANDLE, RefPtr<HandleWorkItem>> m_handles;
-
-    HANDLE m_timerQueue;
 #elif PLATFORM(QT)
     class WorkItemQt;
     QThread* m_workThread;

Modified: trunk/Source/WebKit2/Shared/ChildProcess.cpp (156507 => 156508)


--- trunk/Source/WebKit2/Shared/ChildProcess.cpp	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/Shared/ChildProcess.cpp	2013-09-26 22:45:46 UTC (rev 156508)
@@ -27,10 +27,7 @@
 #include "ChildProcess.h"
 
 #include "SandboxInitializationParameters.h"
-
-#if !OS(WINDOWS)
 #include <unistd.h>
-#endif
 
 using namespace WebCore;
 

Modified: trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp (156507 => 156508)


--- trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp	2013-09-26 22:45:46 UTC (rev 156508)
@@ -127,8 +127,6 @@
     m_connection = CoreIPC::Connection::createServerConnection(connectionIdentifier, this, RunLoop::main());
 #if OS(DARWIN)
     m_connection->setShouldCloseConnectionOnMachExceptions();
-#elif PLATFORM(QT) && !OS(WINDOWS)
-    m_connection->setShouldCloseConnectionOnProcessTermination(processIdentifier());
 #endif
 
     connectionWillOpen(m_connection.get());

Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp (156507 => 156508)


--- trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp	2013-09-26 22:45:46 UTC (rev 156508)
@@ -63,20 +63,12 @@
         hashSet.add(vector[i]);
 }
 
-// We use a ListHashSet so that plugins will be loaded from the additional plugins directories first
-// (which in turn means those plugins will be preferred if two plugins claim the same MIME type).
-#if OS(WINDOWS)
-typedef ListHashSet<String, 32, CaseFoldingHash> PathHashSet;
-#else
-typedef ListHashSet<String, 32> PathHashSet;
-#endif
-
 void PluginInfoStore::loadPluginsIfNecessary()
 {
     if (m_pluginListIsUpToDate)
         return;
 
-    PathHashSet uniquePluginPaths;
+    ListHashSet<String, 32> uniquePluginPaths;
 
     // First, load plug-ins from the additional plug-ins directories specified.
     for (size_t i = 0; i < m_additionalPluginsDirectories.size(); ++i)
@@ -92,9 +84,8 @@
 
     m_plugins.clear();
 
-    PathHashSet::const_iterator end = uniquePluginPaths.end();
-    for (PathHashSet::const_iterator it = uniquePluginPaths.begin(); it != end; ++it)
-        loadPlugin(m_plugins, *it);
+    for (const auto& pluginPath : uniquePluginPaths)
+        loadPlugin(m_plugins, pluginPath);
 
     m_pluginListIsUpToDate = true;
 

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (156507 => 156508)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2013-09-26 22:37:20 UTC (rev 156507)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2013-09-26 22:45:46 UTC (rev 156508)
@@ -79,6 +79,7 @@
 #include <WebCore/SecurityOrigin.h>
 #include <WebCore/Settings.h>
 #include <WebCore/StorageTracker.h>
+#include <unistd.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/HashCountedSet.h>
 #include <wtf/PassRefPtr.h>
@@ -94,9 +95,6 @@
 #include "NetworkProcessConnection.h"
 #endif
 
-#if !OS(WINDOWS)
-#include <unistd.h>
-#endif
 
 #if ENABLE(CUSTOM_PROTOCOLS)
 #include "CustomProtocolManager.h"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to