Title: [164284] releases/WebKitGTK/webkit-2.2/Source/WebKit2
Revision
164284
Author
carlo...@webkit.org
Date
2014-02-18 04:01:12 -0800 (Tue, 18 Feb 2014)

Log Message

Merge r163292 - Fix wrong mix of fcntl commands and flags
https://bugs.webkit.org/show_bug.cgi?id=127842

Reviewed by Darin Adler.

We are mixing the commands to set file descriptor and file status
flags in a couple of fcntl() calls. FD_CLOEXEC must be set using
F_SETFD, and the access mode flags (O_RDONLY, O_WRONLY, O_RDWR)
with F_SETFL.

This combines patches by Guillem Jover and Sergio Correia.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::readBytesFromSocket):
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::createHandle):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog (164283 => 164284)


--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog	2014-02-18 11:55:49 UTC (rev 164283)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog	2014-02-18 12:01:12 UTC (rev 164284)
@@ -1,3 +1,22 @@
+2014-02-03  Alberto Garcia  <be...@igalia.com>
+
+        Fix wrong mix of fcntl commands and flags
+        https://bugs.webkit.org/show_bug.cgi?id=127842
+
+        Reviewed by Darin Adler.
+
+        We are mixing the commands to set file descriptor and file status
+        flags in a couple of fcntl() calls. FD_CLOEXEC must be set using
+        F_SETFD, and the access mode flags (O_RDONLY, O_WRONLY, O_RDWR)
+        with F_SETFL.
+
+        This combines patches by Guillem Jover and Sergio Correia.
+
+        * Platform/IPC/unix/ConnectionUnix.cpp:
+        (IPC::readBytesFromSocket):
+        * Platform/unix/SharedMemoryUnix.cpp:
+        (WebKit::SharedMemory::createHandle):
+
 2014-02-18  Sami Wagiaalla  <swagi...@redhat.com>
 
         [GTK] webkit_web_view_load_html reads UTF8 css files as UTF16

Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp (164283 => 164284)


--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp	2014-02-18 11:55:49 UTC (rev 164283)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp	2014-02-18 12:01:12 UTC (rev 164284)
@@ -351,7 +351,7 @@
                 memcpy(fileDescriptors, CMSG_DATA(controlMessage), sizeof(int) * *fileDescriptorsCount);
 
                 for (size_t i = 0; i < *fileDescriptorsCount; ++i) {
-                    while (fcntl(fileDescriptors[i], F_SETFL, FD_CLOEXEC) == -1) {
+                    while (fcntl(fileDescriptors[i], F_SETFD, FD_CLOEXEC) == -1) {
                         if (errno != EINTR) {
                             ASSERT_NOT_REACHED();
                             break;

Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp (164283 => 164284)


--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp	2014-02-18 11:55:49 UTC (rev 164283)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp	2014-02-18 12:01:12 UTC (rev 164284)
@@ -200,7 +200,7 @@
         }
     }
 
-    while ((fcntl(duplicatedHandle, F_SETFD, FD_CLOEXEC | accessModeFile(protection)) == -1)) {
+    while (fcntl(duplicatedHandle, F_SETFD, FD_CLOEXEC) == -1 || fcntl(duplicatedHandle, F_SETFL, accessModeFile(protection)) == -1) {
         if (errno != EINTR) {
             ASSERT_NOT_REACHED();
             closeWithRetry(duplicatedHandle);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to