forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make PlatformFileForTransit its own class on Windows.
This CL is *mostly* a refactor with no intended behavior change. Previously, PlatformFileForTransit had the same semantics as SharedMemoryHandle, so it was typedef-ed to SharedMemoryHandle. However, the semantics for SharedMemoryHandle are changing, so it's no longer appropriate to do so. This CL includes a small fix to ppb_nacl_private_impl.cc, which previously leaked a HANDLE on Windows, but not on an fd on POSIX. The leak was introduced by "Make PlatformFileForTransit a class on Windows." [commit: 19e5f69]. Prior to that CL: On Windows, NaCl would duplicate the handle into the destination process [closing the original handle in the process], and then pass the result as a raw int. On POSIX, NaCl would duplicate the handle using Chrome IPC, using base::FileDescriptor.auto_close = true, which would cause the IPC subsystem to close the handle. After that CL: On Windows, NaCl would let Chrome IPC transport the handle, but failed to call PlatformFileForTransit::SetOwnershipPassesToIPC(true) [the equivalent of base::FileDescriptor.auto_close]. This caused a leak of the handle in the browser process. In this CL: PlatformFileForTransit is now its own class, with no auto_close parameter because the IPC subsystem always closes the handle in the source process. BUG=713763 Review-Url: https://codereview.chromium.org/2846293002 Cr-Commit-Position: refs/heads/master@{#468213}
- Loading branch information
Showing
5 changed files
with
111 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters