Chromium Code Reviews
Description[mojo-edk] Fix lifetime management of rewritten Windows HANDLEs
HANDLE values are carried in Channel messages as PlatformHandles.
At various points in its lifetime, a PlaformHandle may actually
correspond to a HANDLE in another process's handle table - for example
when sending an outgoing message containing a handle, the handle is
duplicated to the target process and then serialized.
In some cases, a duplicated handle is never sent to the target
process (e.g. an outgoing message queued on a Channel but not
sent before the Channel is torn down). In such cases we were
blindly calling CloseHandle which is incorrect (see comments inside
CL).
This CL adds a field to PlatformHandle to track the process to
which the HANDLE belongs. In addition to being used for sanity
checks in RewriteHandles, this is also used to allow
PlatformHandle to do the right thing when closing a handle owned
by another process.
BUG=603280
R=amistry@chromium.org
Committed: https://crrev.com/0bcc20b48b02c2a84396f3e484da40303be0d5a4
Cr-Commit-Position: refs/heads/master@{#389693}
Patch Set 1 #
Dependent Patchsets: Messages
Total messages: 8 (3 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||