WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
227017
[GLib] Rewrite NetworkCache::Data::adoptMap without FileSystem::MappedFileData::leakHandle and munmap
https://bugs.webkit.org/show_bug.cgi?id=227017
Summary
[GLib] Rewrite NetworkCache::Data::adoptMap without FileSystem::MappedFileDat...
Fujii Hironori
Reported
2021-06-15 00:44:02 PDT
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.
Attachments
WIP patch
(2.83 KB, patch)
2021-06-15 00:52 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Patch
(3.40 KB, patch)
2021-06-21 17:57 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2021-06-15 00:52:03 PDT
Created
attachment 431411
[details]
WIP patch
Chris Dumez
Comment 2
2021-06-15 08:32:06 PDT
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.
Fujii Hironori
Comment 3
2021-06-15 12:58:30 PDT
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.
Chris Dumez
Comment 4
2021-06-15 12:59:33 PDT
(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.
Fujii Hironori
Comment 5
2021-06-15 13:01:17 PDT
OK. Thank you.
Fujii Hironori
Comment 6
2021-06-21 14:58:19 PDT
Reopened. I'm going to fix only NetworkCacheDataGLib.cpp.
Fujii Hironori
Comment 7
2021-06-21 17:57:45 PDT
Created
attachment 431935
[details]
Patch
Fujii Hironori
Comment 8
2021-06-22 12:48:13 PDT
Comment on
attachment 431935
[details]
Patch Clearing flags on attachment: 431935 Committed
r279137
(
239049@main
): <
https://commits.webkit.org/239049@main
>
Fujii Hironori
Comment 9
2021-06-22 12:48:17 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10
2021-06-22 12:49:17 PDT
<
rdar://problem/79628816
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug