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.
Comment 1 by mfo...@chromium.org
, Aug 30