Title: [239261] trunk/Source/WebKit
Revision
239261
Author
[email protected]
Date
2018-12-16 14:29:13 -0800 (Sun, 16 Dec 2018)

Log Message

Unreviewed follow up after r239260
https://bugs.webkit.org/show_bug.cgi?id=192714
<rdar://problem/46762407>


* Platform/win/SharedMemoryWin.cpp:
(WebKit::SharedMemory::allocate): Use PAGE_READWRITE directly instead
of going through the protectAttribute() function, which is removed
because it is now unused.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (239260 => 239261)


--- trunk/Source/WebKit/ChangeLog	2018-12-16 19:39:38 UTC (rev 239260)
+++ trunk/Source/WebKit/ChangeLog	2018-12-16 22:29:13 UTC (rev 239261)
@@ -1,5 +1,16 @@
 2018-12-16  Adrian Perez de Castro  <[email protected]>
 
+        Unreviewed follow up after r239260
+        https://bugs.webkit.org/show_bug.cgi?id=192714
+        <rdar://problem/46762407>
+
+        * Platform/win/SharedMemoryWin.cpp:
+        (WebKit::SharedMemory::allocate): Use PAGE_READWRITE directly instead
+        of going through the protectAttribute() function, which is removed
+        because it is now unused.
+
+2018-12-16  Adrian Perez de Castro  <[email protected]>
+
         Unify SharedMemory factory functions
         https://bugs.webkit.org/show_bug.cgi?id=192714
 

Modified: trunk/Source/WebKit/Platform/win/SharedMemoryWin.cpp (239260 => 239261)


--- trunk/Source/WebKit/Platform/win/SharedMemoryWin.cpp	2018-12-16 19:39:38 UTC (rev 239260)
+++ trunk/Source/WebKit/Platform/win/SharedMemoryWin.cpp	2018-12-16 22:29:13 UTC (rev 239261)
@@ -117,22 +117,9 @@
     return true;
 }
 
-static DWORD protectAttribute(SharedMemory::Protection protection)
-{
-    switch (protection) {
-    case SharedMemory::Protection::ReadOnly:
-        return PAGE_READONLY;
-    case SharedMemory::Protection::ReadWrite:
-        return PAGE_READWRITE;
-    }
-
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
 RefPtr<SharedMemory> SharedMemory::allocate(size_t size)
 {
-    HANDLE handle = ::CreateFileMappingW(INVALID_HANDLE_VALUE, 0, protectAttribute(SharedMemory::Protection::ReadWrite), 0, size, 0);
+    HANDLE handle = ::CreateFileMappingW(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, 0);
     if (!handle)
         return nullptr;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to