[webkit-changes] [WebKit/WebKit] 745625: IPC::Attachment should be movable

Kimmo Kinnunen noreply at github.com
Mon Sep 5 23:43:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7456250f977be13d0902812108227e1dffe8c501
      https://github.com/WebKit/WebKit/commit/7456250f977be13d0902812108227e1dffe8c501
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2022-09-05 (Mon, 05 Sep 2022)

  Changed paths:
    M Source/WTF/wtf/win/Win32Handle.h
    M Source/WebKit/GPUProcess/GPUProcess.cpp
    M Source/WebKit/Platform/IPC/ArgumentCoders.h
    M Source/WebKit/Platform/IPC/Attachment.h
    M Source/WebKit/Platform/IPC/IPCSemaphore.h
    M Source/WebKit/Platform/IPC/StreamServerConnection.cpp
    A Source/WebKit/Platform/IPC/win/ArgumentCodersWin.cpp
    A Source/WebKit/Platform/IPC/win/ArgumentCodersWin.h
    M Source/WebKit/Platform/IPC/win/AttachmentWin.cpp
    M Source/WebKit/Platform/IPC/win/ConnectionWin.cpp
    M Source/WebKit/Platform/IPC/win/IPCSemaphoreWin.cpp
    M Source/WebKit/Platform/SharedMemory.h
    M Source/WebKit/Platform/win/SharedMemoryWin.cpp
    M Source/WebKit/PlatformWin.cmake
    M Source/WebKit/WebProcess/Inspector/WebInspector.cpp
    M Source/WebKit/WebProcess/Network/NetworkProcessConnectionInfo.h

  Log Message:
  -----------
  IPC::Attachment should be movable
https://bugs.webkit.org/show_bug.cgi?id=238944
rdar://problem/91762600

Reviewed by Fujii Hironori.

OS(WINDOWS) was the only variant that did not have a movable IPC::Attachment.
Make Win32Handle be the IPC handle object for OS(WINDOWS).
Use Win32Handle in SharedMemory to avoid duplicated code.

* Source/WTF/wtf/win/Win32Handle.h:
(WTF::Win32Handle::Win32Handle):
(WTF::Win32Handle::operator=):
(WTF::Win32Handle::operator bool const):
* Source/WebKit/Platform/IPC/ArgumentCoders.h:
* Source/WebKit/Platform/IPC/Attachment.h:
(IPC::Attachment::Attachment::handle const):
(IPC::Attachment::Attachment::Attachment): Deleted.
* Source/WebKit/Platform/IPC/IPCSemaphore.h:
* Source/WebKit/Platform/IPC/win/ArgumentCodersWin.cpp: Copied from Source/WebKit/Platform/IPC/win/AttachmentWin.cpp.
(IPC::ArgumentCoder<Win32Handle>::encode):
(ArgumentCoder<Win32Handle>::decode):
* Source/WebKit/Platform/IPC/win/ArgumentCodersWin.h: Added.
* Source/WebKit/Platform/IPC/win/AttachmentWin.cpp:
(IPC::Attachment::Attachment):
(IPC::Attachment::encode const):
(IPC::Attachment::decode):
(IPC::getDuplicatedHandle): Deleted.
* Source/WebKit/Platform/IPC/win/IPCSemaphoreWin.cpp:
(IPC::Semaphore::Semaphore):
(IPC::Semaphore::operator=):
(IPC::Semaphore::signal):
(IPC::Semaphore::wait):
(IPC::Semaphore::waitFor):
(IPC::Semaphore::encode const):
(IPC::Semaphore::decode):
(IPC::Semaphore::destroy):
* Source/WebKit/Platform/SharedMemory.h:
(WebKit::SharedMemory::handle const):
* Source/WebKit/Platform/win/SharedMemoryWin.cpp:
(WebKit::SharedMemory::Handle::encode const):
(WebKit::SharedMemory::Handle::decode):
(WebKit::SharedMemory::Handle::clear):
(WebKit::SharedMemory::allocate):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::SharedMemory::createHandle):
(WebKit::SharedMemory::Handle::Handle): Deleted.
(WebKit::SharedMemory::Handle::operator=): Deleted.
(WebKit::SharedMemory::Handle::~Handle): Deleted.
(WebKit::SharedMemory::Handle::encodeHandle): Deleted.
(WebKit::getDuplicatedHandle): Deleted.
(WebKit::SharedMemory::Handle::decodeHandle): Deleted.
* Source/WebKit/PlatformWin.cmake:

Canonical link: https://commits.webkit.org/254178@main




More information about the webkit-changes mailing list