Bug 227011 - [WinCairo] Turn ENABLE_SHAREABLE_RESOURCE on
Summary: [WinCairo] Turn ENABLE_SHAREABLE_RESOURCE on
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on: 227014 227017
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-14 22:18 PDT by Fujii Hironori
Modified: 2021-06-21 14:48 PDT (History)
13 users (show)

See Also:


Attachments
WIP patch (10.73 KB, patch)
2021-06-14 22:18 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
WIP patch (10.68 KB, patch)
2021-06-14 22:27 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
WIP patch (7.22 KB, patch)
2021-06-17 14:16 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (16.54 KB, patch)
2021-06-20 20:00 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (11.08 KB, patch)
2021-06-21 13:25 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:18:21 PDT
[WinCairo] Turn ENABLE_SHAREABLE_RESOURCE on
Comment 1 Fujii Hironori 2021-06-14 22:18:34 PDT
Created attachment 431401 [details]
WIP patch
Comment 2 Fujii Hironori 2021-06-14 22:27:56 PDT
Created attachment 431402 [details]
WIP patch
Comment 3 Fujii Hironori 2021-06-17 14:16:59 PDT
Created attachment 431720 [details]
WIP patch
Comment 4 Fujii Hironori 2021-06-20 20:00:37 PDT
Created attachment 431829 [details]
Patch
Comment 5 Fujii Hironori 2021-06-21 13:25:09 PDT
Created attachment 431901 [details]
Patch
Comment 6 Don Olmstead 2021-06-21 13:31:44 PDT
Comment on attachment 431901 [details]
Patch

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

> Source/WebKit/NetworkProcess/cache/NetworkCacheDataCurl.cpp:123
> +#if ENABLE(SHAREABLE_RESOURCE) && OS(WINDOWS)
> +RefPtr<SharedMemory> Data::tryCreateSharedMemory() const
> +{
> +    if (isNull() || !isMap())
> +        return nullptr;
> +
> +    HANDLE handle = WTF::get<FileSystem::MappedFileData>(*m_buffer).fileMapping();
> +    HANDLE newHandle;
> +    if (!DuplicateHandle(GetCurrentProcess(), handle, GetCurrentProcess(), &newHandle, 0, false, DUPLICATE_SAME_ACCESS))
> +        return nullptr;
> +
> +    return SharedMemory::adopt(newHandle, m_size, SharedMemory::Protection::ReadOnly);
> +}
> +#endif

You have any plans to do a POSIX implementation that PlayStation can use here too?
Comment 7 Fujii Hironori 2021-06-21 14:39:19 PDT
(In reply to Don Olmstead from comment #6)
> You have any plans to do a POSIX implementation that PlayStation can use
> here too?

It sounds a good idea. But, not high priority for me now. My motivation was fixing a WinCairo assertion failure (Bug 225801), but unfortunately this change doesn't fix it.
Comment 8 Don Olmstead 2021-06-21 14:41:31 PDT
(In reply to Fujii Hironori from comment #7)
> (In reply to Don Olmstead from comment #6)
> > You have any plans to do a POSIX implementation that PlayStation can use
> > here too?
> 
> It sounds a good idea. But, not high priority for me now. My motivation was
> fixing a WinCairo assertion failure (Bug 225801), but unfortunately this
> change doesn't fix it.

Ok can you open a bug for that part?

Builds are green so commit at your leisure
Comment 9 Fujii Hironori 2021-06-21 14:42:16 PDT
Comment on attachment 431901 [details]
Patch

Clearing flags on attachment: 431901

Committed r279085 (239004@main): <https://commits.webkit.org/239004@main>
Comment 10 Fujii Hironori 2021-06-21 14:42:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2021-06-21 14:43:36 PDT
<rdar://problem/79581434>
Comment 12 Fujii Hironori 2021-06-21 14:48:12 PDT
(In reply to Don Olmstead from comment #8)
> Ok can you open a bug for that part?

Yup. Filed.
  Bug 227236 – [PlayStation] Turn ENABLE_SHAREABLE_RESOURCE on