Changeset 239261 in webkit


Ignore:
Timestamp:
Dec 16, 2018 2:29:13 PM (5 years ago)
Author:
Adrian Perez de Castro
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.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r239260 r239261  
     12018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        Unreviewed follow up after r239260
     4        https://bugs.webkit.org/show_bug.cgi?id=192714
     5        <rdar://problem/46762407>
     6
     7        * Platform/win/SharedMemoryWin.cpp:
     8        (WebKit::SharedMemory::allocate): Use PAGE_READWRITE directly instead
     9        of going through the protectAttribute() function, which is removed
     10        because it is now unused.
     11
    1122018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
    213
  • trunk/Source/WebKit/Platform/win/SharedMemoryWin.cpp

    r239260 r239261  
    118118}
    119119
    120 static DWORD protectAttribute(SharedMemory::Protection protection)
    121 {
    122     switch (protection) {
    123     case SharedMemory::Protection::ReadOnly:
    124         return PAGE_READONLY;
    125     case SharedMemory::Protection::ReadWrite:
    126         return PAGE_READWRITE;
    127     }
    128 
    129     ASSERT_NOT_REACHED();
    130     return 0;
    131 }
    132 
    133120RefPtr<SharedMemory> SharedMemory::allocate(size_t size)
    134121{
    135     HANDLE handle = ::CreateFileMappingW(INVALID_HANDLE_VALUE, 0, protectAttribute(SharedMemory::Protection::ReadWrite), 0, size, 0);
     122    HANDLE handle = ::CreateFileMappingW(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, 0);
    136123    if (!handle)
    137124        return nullptr;
Note: See TracChangeset for help on using the changeset viewer.