https://bugs.webkit.org/show_bug.cgi?id=111127
Patch by Kiran Muppala <cmuppala@apple.com> 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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144409
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-02-28 Kiran Muppala <cmuppala@apple.com>
+
+ 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 <conrad_shultz@apple.com>
Need API to control page underlay color
initializerFunctionPtr(peer, event);
}
+
+ if (!strcmp(xpc_dictionary_get_string(event, "message-name"), "pre-bootstrap")) {
+ // Hold on to the pre-bootstrap message.
+ xpc_retain(event);
+ }
}
});
initializerFunctionPtr(peer, event);
}
+
+ if (!strcmp(xpc_dictionary_get_string(event, "message-name"), "pre-bootstrap")) {
+ // Hold on to the pre-bootstrap message.
+ xpc_retain(event);
+ }
}
});
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);