Title: [127983] trunk/Source/WebKit2
Revision
127983
Author
[email protected]
Date
2012-09-09 07:46:26 -0700 (Sun, 09 Sep 2012)

Log Message

[WK2] Fix PLATFORM(WIN) vs. OS(WINDOWS) in various files
https://bugs.webkit.org/show_bug.cgi?id=96178

Patch by Simon Hausmann <[email protected]> on 2012-09-09
Reviewed by Kenneth Rohde Christiansen.

PLATFORM(WIN) is used in various places, where it is safe to use OS(WINDOWS) to allow
the re-use of that code path in ports beyond Safari/Windows.

* Platform/CoreIPC/BinarySemaphore.h:
(BinarySemaphore):
* Platform/CoreIPC/Connection.h:
(Connection):
* Platform/SharedMemory.h:
(Handle):
(SharedMemory):
* Platform/WorkQueue.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (127982 => 127983)


--- trunk/Source/WebKit2/ChangeLog	2012-09-09 14:37:27 UTC (rev 127982)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-09 14:46:26 UTC (rev 127983)
@@ -1,3 +1,22 @@
+2012-09-09  Simon Hausmann  <[email protected]>
+
+        [WK2] Fix PLATFORM(WIN) vs. OS(WINDOWS) in various files
+        https://bugs.webkit.org/show_bug.cgi?id=96178
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        PLATFORM(WIN) is used in various places, where it is safe to use OS(WINDOWS) to allow
+        the re-use of that code path in ports beyond Safari/Windows.
+
+        * Platform/CoreIPC/BinarySemaphore.h:
+        (BinarySemaphore):
+        * Platform/CoreIPC/Connection.h:
+        (Connection):
+        * Platform/SharedMemory.h:
+        (Handle):
+        (SharedMemory):
+        * Platform/WorkQueue.h:
+
 2012-09-08  Jinwoo Song  <[email protected]>
 
         [EFL][WK2] Minibrowser crashes on right mouse click

Modified: trunk/Source/WebKit2/Platform/CoreIPC/BinarySemaphore.h (127982 => 127983)


--- trunk/Source/WebKit2/Platform/CoreIPC/BinarySemaphore.h	2012-09-09 14:37:27 UTC (rev 127982)
+++ trunk/Source/WebKit2/Platform/CoreIPC/BinarySemaphore.h	2012-09-09 14:46:26 UTC (rev 127983)
@@ -41,12 +41,12 @@
     void signal();
     bool wait(double absoluteTime);
 
-#if PLATFORM(WIN)
+#if OS(WINDOWS)
     HANDLE event() const { return m_event; }
 #endif
 
 private:
-#if PLATFORM(WIN)
+#if OS(WINDOWS)
     HANDLE m_event;
 #else
     bool m_isSet;

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.h (127982 => 127983)


--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.h	2012-09-09 14:37:27 UTC (rev 127982)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.h	2012-09-09 14:46:26 UTC (rev 127983)
@@ -148,7 +148,7 @@
 #endif
     };
     static bool identifierIsNull(Identifier identifier) { return identifier.port == MACH_PORT_NULL; }
-#elif PLATFORM(WIN)
+#elif OS(WINDOWS)
     typedef HANDLE Identifier;
     static bool createServerAndClientIdentifiers(Identifier& serverIdentifier, Identifier& clientIdentifier);
     static bool identifierIsNull(Identifier identifier) { return !identifier; }
@@ -379,7 +379,7 @@
     xpc_connection_t m_xpcConnection;
 #endif
 
-#elif PLATFORM(WIN)
+#elif OS(WINDOWS)
     // Called on the connection queue.
     void readEventHandler();
     void writeEventHandler();

Modified: trunk/Source/WebKit2/Platform/SharedMemory.h (127982 => 127983)


--- trunk/Source/WebKit2/Platform/SharedMemory.h	2012-09-09 14:37:27 UTC (rev 127982)
+++ trunk/Source/WebKit2/Platform/SharedMemory.h	2012-09-09 14:46:26 UTC (rev 127983)
@@ -68,7 +68,7 @@
         friend class SharedMemory;
 #if OS(DARWIN)
         mutable mach_port_t m_port;
-#elif PLATFORM(WIN)
+#elif OS(WINDOWS)
         mutable HANDLE m_handle;
 #elif USE(UNIX_DOMAIN_SOCKETS)
         mutable int m_fileDescriptor;
@@ -82,7 +82,7 @@
     // Create a shared memory object from the given handle and the requested protection. Will return 0 on failure.
     static PassRefPtr<SharedMemory> create(const Handle&, Protection);
     
-#if PLATFORM(WIN)
+#if OS(WINDOWS)
     static PassRefPtr<SharedMemory> adopt(HANDLE, size_t, Protection);
 #endif
 
@@ -92,7 +92,7 @@
 
     size_t size() const { return m_size; }
     void* data() const { return m_data; }
-#if PLATFORM(WIN)
+#if OS(WINDOWS)
     HANDLE handle() const { return m_handle; }
 #endif
 
@@ -107,7 +107,7 @@
     void* m_data;
 #if OS(DARWIN)
     mach_port_t m_port;
-#elif PLATFORM(WIN)
+#elif OS(WINDOWS)
     HANDLE m_handle;
 #elif USE(UNIX_DOMAIN_SOCKETS)
     int m_fileDescriptor;

Modified: trunk/Source/WebKit2/Platform/WorkQueue.h (127982 => 127983)


--- trunk/Source/WebKit2/Platform/WorkQueue.h	2012-09-09 14:37:27 UTC (rev 127982)
+++ trunk/Source/WebKit2/Platform/WorkQueue.h	2012-09-09 14:46:26 UTC (rev 127983)
@@ -86,7 +86,7 @@
     // Note that this will adopt the mach port and destroy it when the work queue is invalidated.
     void registerMachPortEventHandler(mach_port_t, MachPortEventType, const Function<void()>&);
     void unregisterMachPortEventHandler(mach_port_t);
-#elif PLATFORM(WIN)
+#elif OS(WINDOWS)
     void registerHandle(HANDLE, const Function<void()>&);
     void unregisterAndCloseHandle(HANDLE);
 #elif PLATFORM(QT)
@@ -117,7 +117,7 @@
     HashMap<mach_port_t, EventSource*> m_eventSources;
     dispatch_queue_t m_dispatchQueue;
 #endif
-#elif PLATFORM(WIN)
+#elif OS(WINDOWS)
     class WorkItemWin : public ThreadSafeRefCounted<WorkItemWin> {
     public:
         static PassRefPtr<WorkItemWin> create(const Function<void()>&, WorkQueue*);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to