Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 1914053003: [mojo-edk] Fix lifetime management of rewritten Windows HANDLEs (Closed)

Created:
4 years, 7 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -3 lines) Patch
M mojo/edk/embedder/platform_handle.h View 2 chunks +8 lines, -1 line 0 comments Download
M mojo/edk/embedder/platform_handle.cc View 1 chunk +26 lines, -0 lines 0 comments Download
M mojo/edk/system/channel.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M mojo/edk/system/node_channel.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M mojo/edk/system/node_controller.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 8 (3 generated)
Ken Rockot(use gerrit already)
Please take a look. Note that because PlatformHandles are stored directly within message buffers, the ...
4 years, 7 months ago (2016-04-26 01:07:56 UTC) #1
Anand Mistry (off Chromium)
lgtm
4 years, 7 months ago (2016-04-26 03:47:43 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1914053003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1914053003/1
4 years, 7 months ago (2016-04-26 03:48:48 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-04-26 04:23:31 UTC) #6
commit-bot: I haz the power
4 years, 7 months ago (2016-04-26 04:25:19 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/0bcc20b48b02c2a84396f3e484da40303be0d5a4
Cr-Commit-Position: refs/heads/master@{#389693}

Powered by Google App Engine
This is Rietveld 408576698