Fix fd ownership mismanagement in V8 initialization.
gin::V8Initializer::LoadV8SnapshotFromFD and LoadV8NativesFromFD were accepting a base::PlatformFile owned by a File and then passing it into MemoryMappedFile::Initialize, which constructs another owning base::File from the PlatformFile. Refactor the functions to take base::File instead, and delete some code that was maintaining a cache that only ever missed. Bug: 884034 Change-Id: I2758bc45de63ee4d34dcd5a4b806f1806e25e4f8 Reviewed-on: https://chromium-review.googlesource.com/c/1247322 Commit-Queue: Josh Gao <jmgao@google.com> Reviewed-by:Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#596775}
Showing
Please register or sign in to comment