[webkit-reviews] review granted: [Bug 227011] [WinCairo] Turn ENABLE_SHAREABLE_RESOURCE on : [Attachment 431901] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 21 13:31:44 PDT 2021


Don Olmstead <don.olmstead at sony.com> has granted Fujii Hironori
<Hironori.Fujii at sony.com>'s request for review:
Bug 227011: [WinCairo] Turn ENABLE_SHAREABLE_RESOURCE on
https://bugs.webkit.org/show_bug.cgi?id=227011

Attachment 431901: Patch

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




--- Comment #6 from Don Olmstead <don.olmstead at sony.com> ---
Comment on attachment 431901
  --> https://bugs.webkit.org/attachment.cgi?id=431901
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?


More information about the webkit-reviews mailing list