Title: [144409] trunk/Source/WebKit2
Revision
144409
Author
[email protected]
Date
2013-02-28 20:18:44 -0800 (Thu, 28 Feb 2013)

Log Message

Add a pre-bootstrap message for NetworkProcess XPC service
https://bugs.webkit.org/show_bug.cgi?id=111127

Patch by Kiran Muppala <[email protected]> on 2013-02-28
Reviewed by Sam Weinig.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::XPCServiceEventHandler): Hold on to the pre-bootstrap message.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler): Ditto.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService): Send a pre-bootstrap message for NetworkProcess
XPC service.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (144408 => 144409)


--- trunk/Source/WebKit2/ChangeLog	2013-03-01 03:35:07 UTC (rev 144408)
+++ trunk/Source/WebKit2/ChangeLog	2013-03-01 04:18:44 UTC (rev 144409)
@@ -1,3 +1,18 @@
+2013-02-28  Kiran Muppala  <[email protected]>
+
+        Add a pre-bootstrap message for NetworkProcess XPC service
+        https://bugs.webkit.org/show_bug.cgi?id=111127
+
+        Reviewed by Sam Weinig.
+
+        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
+        (WebKit::XPCServiceEventHandler): Hold on to the pre-bootstrap message.
+        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
+        (WebKit::XPCServiceEventHandler): Ditto.
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::connectToService): Send a pre-bootstrap message for NetworkProcess
+        XPC service.
+
 2013-02-28  Conrad Shultz  <[email protected]>
 
         Need API to control page underlay color

Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm (144408 => 144409)


--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm	2013-03-01 03:35:07 UTC (rev 144408)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm	2013-03-01 04:18:44 UTC (rev 144409)
@@ -124,6 +124,11 @@
 
                 initializerFunctionPtr(peer, event);
             }
+
+            if (!strcmp(xpc_dictionary_get_string(event, "message-name"), "pre-bootstrap")) {
+                // Hold on to the pre-bootstrap message.
+                xpc_retain(event);
+            }
         }
     });
 

Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm (144408 => 144409)


--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm	2013-03-01 03:35:07 UTC (rev 144408)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm	2013-03-01 04:18:44 UTC (rev 144409)
@@ -59,6 +59,11 @@
 
                 initializerFunctionPtr(peer, event);
             }
+
+            if (!strcmp(xpc_dictionary_get_string(event, "message-name"), "pre-bootstrap")) {
+                // Hold on to the pre-bootstrap message.
+                xpc_retain(event);
+            }
         }
     });
 

Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (144408 => 144409)


--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2013-03-01 03:35:07 UTC (rev 144408)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2013-03-01 04:18:44 UTC (rev 144409)
@@ -188,6 +188,15 @@
     xpc_connection_set_event_handler(connection, ^(xpc_object_t event) { });
     xpc_connection_resume(connection);
 
+#if ENABLE(NETWORK_PROCESS)
+    if (launchOptions.processType == ProcessLauncher::NetworkProcess) {
+        xpc_object_t preBootstrapMessage = xpc_dictionary_create(0, 0, 0);
+        xpc_dictionary_set_string(preBootstrapMessage, "message-name", "pre-bootstrap");
+        xpc_connection_send_message(connection, preBootstrapMessage);
+        xpc_release(preBootstrapMessage);
+    }
+#endif
+
     // Create the listening port.
     mach_port_t listeningPort;
     mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to