Changeset 82615 in webkit


Ignore:
Timestamp:
Mar 31, 2011 2:09:30 PM (13 years ago)
Author:
Adam Roben
Message:

Specify both FILE_MAP_READ and FILE_MAP_WRITE when creating a read-write SharedMemory object

When passed to ::MapViewOfFile, FILE_MAP_WRITE implies FILE_MAP_READ, but other file mapping
APIs don't work that way. This bug wasn't causing any problems in practice, but it would
have prevented us from creating a DIB that wraps a SharedMemory object (which I noticed
while working on another bug).

Fixes <http://webkit.org/b/57576> File mappings used by read-write SharedMemory objects
aren't correctly marked as read-write after being sent over a CoreIPC::Connection

Reviewed by Brian Weinstein.

  • Platform/win/SharedMemoryWin.cpp:

(WebKit::accessRights): Specify FILE_MAP_READ in addition to FILE_MAP_WRITE for read-write
SharedMemory.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r82610 r82615  
     12011-03-31  Adam Roben  <aroben@apple.com>
     2
     3        Specify both FILE_MAP_READ and FILE_MAP_WRITE when creating a read-write SharedMemory object
     4
     5        When passed to ::MapViewOfFile, FILE_MAP_WRITE implies FILE_MAP_READ, but other file mapping
     6        APIs don't work that way. This bug wasn't causing any problems in practice, but it would
     7        have prevented us from creating a DIB that wraps a SharedMemory object (which I noticed
     8        while working on another bug).
     9
     10        Fixes <http://webkit.org/b/57576> File mappings used by read-write SharedMemory objects
     11        aren't correctly marked as read-write after being sent over a CoreIPC::Connection
     12
     13        Reviewed by Brian Weinstein.
     14
     15        * Platform/win/SharedMemoryWin.cpp:
     16        (WebKit::accessRights): Specify FILE_MAP_READ in addition to FILE_MAP_WRITE for read-write
     17        SharedMemory.
     18
    1192011-03-31  Adam Roben  <aroben@apple.com>
    220
  • trunk/Source/WebKit2/Platform/win/SharedMemoryWin.cpp

    r78251 r82615  
    137137        return FILE_MAP_READ;
    138138    case SharedMemory::ReadWrite:
    139         // FILE_MAP_WRITE implies read access, too.
    140         return FILE_MAP_WRITE;
     139        return FILE_MAP_READ | FILE_MAP_WRITE;
    141140    }
    142141
Note: See TracChangeset for help on using the changeset viewer.