Rewrite NetworkCache::Data::adoptMap not to use FileSystem::MappedFileData::leakHandle Bug 227011 is going to add a file mapping handle to FileSystem::MappedFileData for Windows port create a SharedMemory from a MappedFileData. Destruction of MappedFileData should be done only by MappedFileData dtor.
Created attachment 431411 [details] WIP patch
Comment on attachment 431411 [details] WIP patch View in context: https://bugs.webkit.org/attachment.cgi?id=431411&action=review > Source/WebKit/NetworkProcess/cache/NetworkCacheDataCocoa.mm:98 > + const void* map = mappedFile.data(); Which do you need to change Cocoa code? The new code is less efficient.
Comment on attachment 431411 [details] WIP patch View in context: https://bugs.webkit.org/attachment.cgi?id=431411&action=review >> Source/WebKit/NetworkProcess/cache/NetworkCacheDataCocoa.mm:98 >> + const void* map = mappedFile.data(); > > Which do you need to change Cocoa code? The new code is less efficient. This change isn't technically a mandatory for Bug 227017. I can keep FileSystem::MappedFileData::leakHande just for this. Because Bug 227017 is going to add HANDLE of a file mapping to MappedFileData, the combination of FileSystem::MappedFileData::leakHande and FileSystem::unmapViewOfFile is too problematic. That's the reason I want to remove. But, I can keep MappedFileData::leakHande by adding #if !OS(WINDOWS) if you like.
(In reply to Fujii Hironori from comment #3) > Comment on attachment 431411 [details] > WIP patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=431411&action=review > > >> Source/WebKit/NetworkProcess/cache/NetworkCacheDataCocoa.mm:98 > >> + const void* map = mappedFile.data(); > > > > Which do you need to change Cocoa code? The new code is less efficient. > > This change isn't technically a mandatory for Bug 227017. > I can keep FileSystem::MappedFileData::leakHande just for this. > > Because Bug 227017 is going to add HANDLE of a file mapping to > MappedFileData, the combination of > FileSystem::MappedFileData::leakHande and > FileSystem::unmapViewOfFile is too problematic. > That's the reason I want to remove. > > But, I can keep MappedFileData::leakHande by adding #if !OS(WINDOWS) if you > like. I think that would be good, since the replacement Cocoa code wouldn't be as efficient otherwise.
OK. Thank you.
Reopened. I'm going to fix only NetworkCacheDataGLib.cpp.
Created attachment 431935 [details] Patch
Comment on attachment 431935 [details] Patch Clearing flags on attachment: 431935 Committed r279137 (239049@main): <https://commits.webkit.org/239049@main>
All reviewed patches have been landed. Closing bug.
<rdar://problem/79628816>