Begin work on supporting reply blocks in _WKRemoteObjectRegistry
https://bugs.webkit.org/show_bug.cgi?id=150739
Reviewed by Tim Horton.
Source/WebKit2:
* Platform/spi/Cocoa/BlockSPI.h:
Add SPI header.
* Shared/API/Cocoa/RemoteObjectInvocation.h:
(WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
(WebKit::RemoteObjectInvocation::replyInfo):
* Shared/API/Cocoa/RemoteObjectInvocation.mm:
(WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
(WebKit::RemoteObjectInvocation::encode):
(WebKit::RemoteObjectInvocation::decode):
Add an optional ReplyInfo struct to RemoteObjectInvocation.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(generateReplyIdentifier):
Helper function to generate a reply identifier.
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
Do some block parameter validation.
* WebKit2.xcodeproj/project.pbxproj:
Tools:
Add a test. We only test the encoding right now.
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.h:
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm:
(-[RemoteObjectRegistryPlugIn sayHello:completionHandler:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191831
268f45cc-cd09-0410-ab3c-
d52691b4dbfc