Title: [236775] trunk/Source/WebKit
Revision
236775
Author
commit-qu...@webkit.org
Date
2018-10-02 17:13:09 -0700 (Tue, 02 Oct 2018)

Log Message

Deprecate WKConnection
https://bugs.webkit.org/show_bug.cgi?id=190147

Patch by Alex Christensen <achristen...@webkit.org> on 2018-10-02
Reviewed by Andy Estes.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKConnection.h:
* UIProcess/API/Cocoa/WKConnection.mm:
(didReceiveMessage):
(didClose):
* UIProcess/API/Cocoa/WKConnectionInternal.h:
* UIProcess/API/Cocoa/WKProcessGroup.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (236774 => 236775)


--- trunk/Source/WebKit/ChangeLog	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/ChangeLog	2018-10-03 00:13:09 UTC (rev 236775)
@@ -1,3 +1,21 @@
+2018-10-02  Alex Christensen  <achristen...@webkit.org>
+
+        Deprecate WKConnection
+        https://bugs.webkit.org/show_bug.cgi?id=190147
+
+        Reviewed by Andy Estes.
+
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject):
+        * UIProcess/API/Cocoa/WKConnection.h:
+        * UIProcess/API/Cocoa/WKConnection.mm:
+        (didReceiveMessage):
+        (didClose):
+        * UIProcess/API/Cocoa/WKConnectionInternal.h:
+        * UIProcess/API/Cocoa/WKProcessGroup.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
+
 2018-10-01  Dean Jackson  <d...@apple.com>
 
         [macOS] Switching to discrete GPU should be done in the UI process

Modified: trunk/Source/WebKit/Shared/Cocoa/APIObject.mm (236774 => 236775)


--- trunk/Source/WebKit/Shared/Cocoa/APIObject.mm	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/Shared/Cocoa/APIObject.mm	2018-10-03 00:13:09 UTC (rev 236775)
@@ -178,7 +178,9 @@
     case Type::Connection:
         // While not actually a WKObject instance, WKConnection uses allocateWKObject to allocate extra space
         // instead of using ObjectStorage because the wrapped C++ object is a subclass of WebConnection.
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         wrapper = allocateWKObject([WKConnection self], size);
+        ALLOW_DEPRECATED_DECLARATIONS_END
         break;
 
     case Type::Preferences:

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.h (236774 => 236775)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.h	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.h	2018-10-03 00:13:09 UTC (rev 236775)
@@ -38,7 +38,7 @@
 
 @end
 
-WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("_WKRemoteObjectRegistry", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKConnection : NSObject
 
 - (void)sendMessageWithName:(NSString *)messageName body:(id)messageBody;

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm (236774 => 236775)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm	2018-10-03 00:13:09 UTC (rev 236775)
@@ -49,7 +49,9 @@
 
 static void didReceiveMessage(WKConnectionRef, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto connection = (__bridge WKConnection *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto delegate = connection->_delegate.get();
 
     if ([delegate respondsToSelector:@selector(connection:didReceiveMessageWithName:body:)]) {
@@ -61,7 +63,9 @@
 
 static void didClose(WKConnectionRef, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto connection = (__bridge WKConnection *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto delegate = connection->_delegate.get();
 
     if ([delegate respondsToSelector:@selector(connectionDidClose:)])

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnectionInternal.h (236774 => 236775)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnectionInternal.h	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnectionInternal.h	2018-10-03 00:13:09 UTC (rev 236775)
@@ -33,7 +33,9 @@
 namespace WebKit {
 
 template<> struct WrapperTraits<WebConnection> {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     using WrapperClass = WKConnection;
+    ALLOW_DEPRECATED_DECLARATIONS_END
 };
 
 }

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.h (236774 => 236775)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.h	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.h	2018-10-03 00:13:09 UTC (rev 236775)
@@ -39,7 +39,10 @@
 
 @required
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 - (void)processGroup:(WKProcessGroup *)processGroup didCreateConnectionToWebProcessPlugIn:(WKConnection *)connection;
+#pragma clang diagnostic pop
 
 @end
 

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h (236774 => 236775)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h	2018-10-03 00:13:09 UTC (rev 236775)
@@ -45,7 +45,10 @@
 @interface WKWebProcessPlugInController : NSObject
 - (void)extendClassesForParameterCoder:(NSArray *)classes WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 @property (readonly) WKConnection *connection;
+#pragma clang diagnostic pop
 
 @property (readonly) id parameters;
 

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm (236774 => 236775)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm	2018-10-02 23:55:42 UTC (rev 236774)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm	2018-10-03 00:13:09 UTC (rev 236775)
@@ -91,10 +91,12 @@
     setUpBundleClient(self, *_bundle);
 }
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 - (WKConnection *)connection
 {
     return wrapper(*_bundle->webConnectionToUIProcess());
 }
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 - (id)parameters
 {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to