New issue
Advanced search Search tips

Issue 879278 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Task

Blocking:
issue 786316



Sign in to add a comment

Fix ownership in base::PlatformFile/ScopedPlatformFile

Project Member Reported by mfo...@chromium.org, Aug 30

Issue description

With the long term goal of implementing guard_ids for Mac file descriptors, it would be helpful to have PlatformFile/ScopedPlatformFile support the necessary bookkeeping.

However, erikchen@ found:

"I thought that I could get away with just modifying base/files/file_posix.cc, but that produces quite a bit of duplicated code since base::File relies on ScopedPlatformFile. I started modifying PlatformFile and ScopedPlatformFile and ran into problem that the existing code has broken/non-existent ownership semantics all over the place.

I think the right solution is to fix ownership semantics for PlatformFile/ScopedPlatformFile [in fact, getting rid of PlatformFile everywhere], and then updating PlatformFile to carry a uint64_t guard_id on macOS, and then updating base::File to support the guard parameter."

This task tracks the work to address the ownership issues, which could enable guard_id implementation in base::ScopedPlatformFile.
 
Blocking: 786316

Sign in to add a comment