Enable IPC sending and receiving non-default-constructible types
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2019 21:23:15 +0000 (21:23 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2019 21:23:15 +0000 (21:23 +0000)
commit80a9ee25fed2f0a88e8d6b563426e399eee38f87
tree803c83dc3909990d065e065813579cbd718d009e
parentd84de4a3bd939e194bd3f9f9d4a640f84d2a1116
Enable IPC sending and receiving non-default-constructible types
https://bugs.webkit.org/show_bug.cgi?id=196132

Reviewed by Geoff Garen.

Source/WebCore:

This basically just requires the decoding of std::tuple to return an Optional<std::tuple> instead of
constructing a std::tuple then decoding into it.  I now decode synchronous replies into an Optional<std::tuple>
then move it into the tuple of references where the successfully decoded reply should go.  This required
the synchronous reply types be move constructible and move assignable.

* Modules/indexeddb/shared/IDBRequestData.h:
* Modules/indexeddb/shared/IDBTransactionInfo.h:
* platform/DragImage.h:
* platform/PasteboardWriterData.h:
* platform/audio/mac/CAAudioStreamDescription.h:
* platform/graphics/RemoteVideoSample.h:

Source/WebKit:

* Platform/IPC/ArgumentCoder.h:
* Platform/IPC/ArgumentCoders.h:
(IPC::TupleEncoder::encode):
(IPC::tupleFromTupleAndObject):
(IPC::TupleDecoderImpl::decode):
(IPC::TupleDecoderImpl<Type>::decode):
(IPC::TupleDecoder::decode):
(IPC::TupleDecoder<0>::decode):
(IPC::TupleCoder::encode): Deleted.
(IPC::TupleCoder::decode): Deleted.
* Platform/IPC/Connection.h:
(IPC::Connection::sendWithReply):
(IPC::TupleMover::move):
(IPC::moveTuple):
(IPC::Connection::sendSync):
* Platform/IPC/Decoder.h:
(IPC::Decoder::decode):
(IPC::Decoder::operator>>):
* Platform/IPC/HandleMessage.h:
(IPC::handleMessage):
(IPC::handleMessageSynchronous):
(IPC::handleMessageSynchronousWantsConnection):
(IPC::handleMessageAsync):
* Platform/SharedMemory.h:
* Scripts/webkit/LegacyMessages-expected.h:
* Scripts/webkit/Messages-expected.h:
* Scripts/webkit/MessagesSuperclass-expected.h:
* Scripts/webkit/messages.py:
* Shared/Databases/IndexedDB/WebIDBResult.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
* Shared/ShareableBitmap.h:
* Shared/ShareableResource.h:
* Shared/UpdateInfo.h:
* Shared/WebEvent.h:
* Shared/WebProcessCreationParameters.cpp:
* Shared/WebProcessCreationParameters.h:
* Shared/mac/SecItemResponseData.cpp:
(WebKit::SecItemResponseData::SecItemResponseData):
(WebKit::SecItemResponseData::decode):
* Shared/mac/SecItemResponseData.h:
* WebProcess/MediaStream/MediaDeviceSandboxExtensions.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h
Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h
Source/WebCore/platform/DragImage.h
Source/WebCore/platform/PasteboardWriterData.h
Source/WebCore/platform/audio/mac/CAAudioStreamDescription.h
Source/WebCore/platform/graphics/RemoteVideoSample.h
Source/WebKit/ChangeLog
Source/WebKit/Platform/IPC/ArgumentCoder.h
Source/WebKit/Platform/IPC/ArgumentCoders.h
Source/WebKit/Platform/IPC/Connection.h
Source/WebKit/Platform/IPC/Decoder.h
Source/WebKit/Platform/IPC/HandleMessage.h
Source/WebKit/Platform/SharedMemory.h
Source/WebKit/Platform/cocoa/SharedMemoryCocoa.cpp
Source/WebKit/Platform/unix/SharedMemoryUnix.cpp
Source/WebKit/Platform/win/SharedMemoryWin.cpp
Source/WebKit/Scripts/webkit/LegacyMessages-expected.h
Source/WebKit/Scripts/webkit/Messages-expected.h
Source/WebKit/Scripts/webkit/MessagesSuperclass-expected.h
Source/WebKit/Scripts/webkit/messages.py
Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.h
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
Source/WebKit/Shared/ShareableBitmap.h
Source/WebKit/Shared/ShareableResource.h
Source/WebKit/Shared/UpdateInfo.h
Source/WebKit/Shared/WebEvent.h
Source/WebKit/Shared/WebProcessCreationParameters.cpp
Source/WebKit/Shared/WebProcessCreationParameters.h
Source/WebKit/Shared/mac/SecItemResponseData.cpp
Source/WebKit/Shared/mac/SecItemResponseData.h
Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h