Changeset 156508 in webkit


Ignore:
Timestamp:
Sep 26, 2013 3:45:46 PM (11 years ago)
Author:
andersca@apple.com
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:
Location:
trunk/Source/WebKit2
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r156487 r156508  
     12013-09-26  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove Windows code
     4        https://bugs.webkit.org/show_bug.cgi?id=121988
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * Platform/CoreIPC/Connection.h:
     9        * Platform/CoreIPC/win/ConnectionWin.cpp: Removed.
     10        * Platform/SharedMemory.h:
     11        * Platform/WorkQueue.h:
     12        * Platform/win/SharedMemoryWin.cpp: Removed.
     13        * Platform/win/WorkQueueWin.cpp: Removed.
     14        * Shared/ChildProcess.cpp:
     15        * Shared/ChildProcessProxy.cpp:
     16        (WebKit::ChildProcessProxy::didFinishLaunching):
     17        * UIProcess/Plugins/PluginInfoStore.cpp:
     18        (WebKit::PluginInfoStore::loadPluginsIfNecessary):
     19        * WebProcess/WebProcess.cpp:
     20
    1212013-09-26  Anders Carlsson  <andersca@apple.com>
    222
  • trunk/Source/WebKit2/Platform/CoreIPC/Connection.h

    r156420 r156508  
    127127    };
    128128    static bool identifierIsNull(Identifier identifier) { return identifier.port == MACH_PORT_NULL; }
    129 #elif OS(WINDOWS)
    130     typedef HANDLE Identifier;
    131     static bool createServerAndClientIdentifiers(Identifier& serverIdentifier, Identifier& clientIdentifier);
    132     static bool identifierIsNull(Identifier identifier) { return !identifier; }
    133129#elif USE(UNIX_DOMAIN_SOCKETS)
    134130    typedef int Identifier;
     
    313309#endif
    314310
    315 #elif OS(WINDOWS)
    316     // Called on the connection queue.
    317     void readEventHandler();
    318     void writeEventHandler();
    319 
    320     // Called by Connection::SyncMessageState::waitWhileDispatchingSentWin32Messages.
    321     // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the
    322     // same time zone as WTF::currentTime(). Dispatches sent (not posted) messages to the passed-in
    323     // set of HWNDs until the semaphore is signaled or absoluteTime is reached. Returns true if the
    324     // semaphore is signaled, false otherwise.
    325     static bool dispatchSentMessagesUntil(const Vector<HWND>& windows, WTF::BinarySemaphore& semaphore, double absoluteTime);
    326 
    327     Vector<uint8_t> m_readBuffer;
    328     OVERLAPPED m_readState;
    329     std::unique_ptr<MessageEncoder> m_pendingWriteEncoder;
    330     OVERLAPPED m_writeState;
    331     HANDLE m_connectionPipe;
    332311#elif USE(UNIX_DOMAIN_SOCKETS)
    333312    // Called on the connection queue.
  • trunk/Source/WebKit2/Platform/SharedMemory.h

    r146544 r156508  
    6969#if OS(DARWIN)
    7070        mutable mach_port_t m_port;
    71 #elif OS(WINDOWS)
    72         mutable HANDLE m_handle;
    7371#elif USE(UNIX_DOMAIN_SOCKETS)
    7472        mutable int m_fileDescriptor;
     
    8785    static PassRefPtr<SharedMemory> createFromVMBuffer(void*, size_t);
    8886
    89 #if OS(WINDOWS)
    90     static PassRefPtr<SharedMemory> adopt(HANDLE, size_t, Protection);
    91 #endif
    92 
    9387    ~SharedMemory();
    9488
     
    9791    size_t size() const { return m_size; }
    9892    void* data() const { return m_data; }
    99 #if OS(WINDOWS)
    100     HANDLE handle() const { return m_handle; }
    101 #endif
    10293
    10394    // Creates a copy-on-write copy of the first |size| bytes.
     
    114105#if OS(DARWIN)
    115106    mach_port_t m_port;
    116 #elif OS(WINDOWS)
    117     HANDLE m_handle;
    118107#elif USE(UNIX_DOMAIN_SOCKETS)
    119108    int m_fileDescriptor;
  • trunk/Source/WebKit2/Platform/WorkQueue.h

    r149848 r156508  
    7272#if OS(DARWIN)
    7373    dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
    74 
    75 #elif OS(WINDOWS)
    76     void registerHandle(HANDLE, const Function<void()>&);
    77     void unregisterAndCloseHandle(HANDLE);
    7874#elif PLATFORM(QT)
    7975    QSocketNotifier* registerSocketEventHandler(int, QSocketNotifier::Type, const Function<void()>&);
     
    9793    static void executeFunction(void*);
    9894    dispatch_queue_t m_dispatchQueue;
    99 #elif OS(WINDOWS)
    100     class WorkItemWin : public ThreadSafeRefCounted<WorkItemWin> {
    101     public:
    102         static PassRefPtr<WorkItemWin> create(const Function<void()>&, WorkQueue*);
    103         virtual ~WorkItemWin();
    104 
    105         Function<void()>& function() { return m_function; }
    106         WorkQueue* queue() const { return m_queue.get(); }
    107 
    108     protected:
    109         WorkItemWin(const Function<void()>&, WorkQueue*);
    110 
    111     private:
    112         Function<void()> m_function;
    113         RefPtr<WorkQueue> m_queue;
    114     };
    115 
    116     class HandleWorkItem : public WorkItemWin {
    117     public:
    118         static PassRefPtr<HandleWorkItem> createByAdoptingHandle(HANDLE, const Function<void()>&, WorkQueue*);
    119         virtual ~HandleWorkItem();
    120 
    121         void setWaitHandle(HANDLE waitHandle) { m_waitHandle = waitHandle; }
    122         HANDLE waitHandle() const { return m_waitHandle; }
    123 
    124     private:
    125         HandleWorkItem(HANDLE, const Function<void()>&, WorkQueue*);
    126 
    127         HANDLE m_handle;
    128         HANDLE m_waitHandle;
    129     };
    130 
    131     static void CALLBACK handleCallback(void* context, BOOLEAN timerOrWaitFired);
    132     static void CALLBACK timerCallback(void* context, BOOLEAN timerOrWaitFired);
    133     static DWORD WINAPI workThreadCallback(void* context);
    134 
    135     bool tryRegisterAsWorkThread();
    136     void unregisterAsWorkThread();
    137     void performWorkOnRegisteredWorkThread();
    138 
    139     static void unregisterWaitAndDestroyItemSoon(PassRefPtr<HandleWorkItem>);
    140     static DWORD WINAPI unregisterWaitAndDestroyItemCallback(void* context);
    141 
    142     volatile LONG m_isWorkThreadRegistered;
    143 
    144     Mutex m_workItemQueueLock;
    145     Vector<RefPtr<WorkItemWin>> m_workItemQueue;
    146 
    147     Mutex m_handlesLock;
    148     HashMap<HANDLE, RefPtr<HandleWorkItem>> m_handles;
    149 
    150     HANDLE m_timerQueue;
    15195#elif PLATFORM(QT)
    15296    class WorkItemQt;
  • trunk/Source/WebKit2/Shared/ChildProcess.cpp

    r150935 r156508  
    2828
    2929#include "SandboxInitializationParameters.h"
    30 
    31 #if !OS(WINDOWS)
    3230#include <unistd.h>
    33 #endif
    3431
    3532using namespace WebCore;
  • trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp

    r156354 r156508  
    128128#if OS(DARWIN)
    129129    m_connection->setShouldCloseConnectionOnMachExceptions();
    130 #elif PLATFORM(QT) && !OS(WINDOWS)
    131     m_connection->setShouldCloseConnectionOnProcessTermination(processIdentifier());
    132130#endif
    133131
  • trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp

    r151530 r156508  
    6464}
    6565
    66 // We use a ListHashSet so that plugins will be loaded from the additional plugins directories first
    67 // (which in turn means those plugins will be preferred if two plugins claim the same MIME type).
    68 #if OS(WINDOWS)
    69 typedef ListHashSet<String, 32, CaseFoldingHash> PathHashSet;
    70 #else
    71 typedef ListHashSet<String, 32> PathHashSet;
    72 #endif
    73 
    7466void PluginInfoStore::loadPluginsIfNecessary()
    7567{
     
    7769        return;
    7870
    79     PathHashSet uniquePluginPaths;
     71    ListHashSet<String, 32> uniquePluginPaths;
    8072
    8173    // First, load plug-ins from the additional plug-ins directories specified.
     
    9385    m_plugins.clear();
    9486
    95     PathHashSet::const_iterator end = uniquePluginPaths.end();
    96     for (PathHashSet::const_iterator it = uniquePluginPaths.begin(); it != end; ++it)
    97         loadPlugin(m_plugins, *it);
     87    for (const auto& pluginPath : uniquePluginPaths)
     88        loadPlugin(m_plugins, pluginPath);
    9889
    9990    m_pluginListIsUpToDate = true;
  • trunk/Source/WebKit2/WebProcess/WebProcess.cpp

    r156354 r156508  
    8080#include <WebCore/Settings.h>
    8181#include <WebCore/StorageTracker.h>
     82#include <unistd.h>
    8283#include <wtf/CurrentTime.h>
    8384#include <wtf/HashCountedSet.h>
     
    9596#endif
    9697
    97 #if !OS(WINDOWS)
    98 #include <unistd.h>
    99 #endif
    10098
    10199#if ENABLE(CUSTOM_PROTOCOLS)
Note: See TracChangeset for help on using the changeset viewer.