Bug 227014 - Reimplement JSC::CachePayload without FileSystem::unmapViewOfFile and FileSystem::MappedFileData::leakHandle
Summary: Reimplement JSC::CachePayload without FileSystem::unmapViewOfFile and FileSys...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 227011
  Show dependency treegraph
 
Reported: 2021-06-14 22:47 PDT by Fujii Hironori
Modified: 2021-06-17 14:14 PDT (History)
13 users (show)

See Also:


Attachments
Patch (7.04 KB, patch)
2021-06-14 22:52 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (5.46 KB, patch)
2021-06-15 00:24 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch for landing (5.46 KB, patch)
2021-06-17 13:07 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2021-06-14 22:47:11 PDT
Reimplement JSC::CachePayload without FileSystem::unmapViewOfFile and FileSystem::MappedFileData::leakHandle

r247542 (Bug 199759) added FileSystem::unmapViewOfFile and
FileSystem::MappedFileData::leakHandle for JSC::CachePayload to
get the mapped address and to free the address.

Bug 227011 is going to add a file mapping handle to
FileSystem::MappedFileData for Windows port. Destruction of
MappedFileData should be done only by MappedFileData dtor.
Comment 1 Fujii Hironori 2021-06-14 22:52:28 PDT
Created attachment 431405 [details]
Patch
Comment 2 Fujii Hironori 2021-06-15 00:24:26 PDT
Created attachment 431409 [details]
Patch
Comment 3 Fujii Hironori 2021-06-16 12:57:34 PDT
Could anyone review?
Comment 4 Yusuke Suzuki 2021-06-16 12:58:03 PDT
I'll look soon after meeting :)
Comment 5 Yusuke Suzuki 2021-06-17 01:36:32 PDT
Comment on attachment 431409 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=431409&action=review

r=me

> Source/JavaScriptCore/runtime/CachePayload.cpp:38
> +    return CachePayload(std::make_pair(WTFMove(data), size));

I think we can use `std::pair { ... }` instead of `make_pair`.

> Source/JavaScriptCore/runtime/CachePayload.cpp:43
> +    return CachePayload(std::make_pair(nullptr, 0));

Ditto.

> Source/JavaScriptCore/runtime/CachePayload.cpp:49
> +    other.m_data = std::make_pair(nullptr, 0);

Ditto.
Comment 6 Fujii Hironori 2021-06-17 13:07:14 PDT
Created attachment 431712 [details]
Patch for landing
Comment 7 Fujii Hironori 2021-06-17 14:12:59 PDT
Comment on attachment 431712 [details]
Patch for landing

Clearing flags on attachment: 431712

Committed r279008 (238933@main): <https://commits.webkit.org/238933@main>
Comment 8 Fujii Hironori 2021-06-17 14:13:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2021-06-17 14:14:34 PDT
<rdar://problem/79470135>