Title: [185090] trunk/Source
- Revision
- 185090
- Author
- [email protected]
- Date
- 2015-06-01 17:26:35 -0700 (Mon, 01 Jun 2015)
Log Message
Use xpc_connection_set_oneshot_instance where possible
https://bugs.webkit.org/show_bug.cgi?id=145535
rdar://problem/21109994
Reviewed by Sam Weinig.
Source/WebKit2:
Use xpc_connection_set_oneshot_instance where possible; this will make sure that the
web process instances go away when the web process exits.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::connectToReExecService):
Source/WTF:
Add SPI declaration.
* wtf/spi/darwin/XPCSPI.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (185089 => 185090)
--- trunk/Source/WTF/ChangeLog 2015-06-02 00:01:40 UTC (rev 185089)
+++ trunk/Source/WTF/ChangeLog 2015-06-02 00:26:35 UTC (rev 185090)
@@ -1,3 +1,15 @@
+2015-06-01 Anders Carlsson <[email protected]>
+
+ Use xpc_connection_set_oneshot_instance where possible
+ https://bugs.webkit.org/show_bug.cgi?id=145535
+ rdar://problem/21109994
+
+ Reviewed by Sam Weinig.
+
+ Add SPI declaration.
+
+ * wtf/spi/darwin/XPCSPI.h:
+
2015-05-29 Anders Carlsson <[email protected]>
Missing #import of Platform.h in several WTF headers
Modified: trunk/Source/WTF/wtf/spi/darwin/XPCSPI.h (185089 => 185090)
--- trunk/Source/WTF/wtf/spi/darwin/XPCSPI.h 2015-06-02 00:01:40 UTC (rev 185089)
+++ trunk/Source/WTF/wtf/spi/darwin/XPCSPI.h 2015-06-02 00:26:35 UTC (rev 185090)
@@ -143,6 +143,7 @@
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
EXTERN_C void xpc_connection_set_bootstrap(xpc_connection_t, xpc_object_t bootstrap);
EXTERN_C xpc_object_t xpc_copy_bootstrap(void);
+EXTERN_C void xpc_connection_set_oneshot_instance(xpc_connection_t, uuid_t instance);
#endif
#if OS_OBJECT_USE_OBJC_RETAIN_RELEASE
Modified: trunk/Source/WebKit2/ChangeLog (185089 => 185090)
--- trunk/Source/WebKit2/ChangeLog 2015-06-02 00:01:40 UTC (rev 185089)
+++ trunk/Source/WebKit2/ChangeLog 2015-06-02 00:26:35 UTC (rev 185090)
@@ -1,3 +1,18 @@
+2015-06-01 Anders Carlsson <[email protected]>
+
+ Use xpc_connection_set_oneshot_instance where possible
+ https://bugs.webkit.org/show_bug.cgi?id=145535
+ rdar://problem/21109994
+
+ Reviewed by Sam Weinig.
+
+ Use xpc_connection_set_oneshot_instance where possible; this will make sure that the
+ web process instances go away when the web process exits.
+
+ * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+ (WebKit::connectToService):
+ (WebKit::connectToReExecService):
+
2015-06-01 Enrica Casucci <[email protected]>
[iOS] Hardware Keyboard: Command + left arrow does not work.
Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (185089 => 185090)
--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2015-06-02 00:01:40 UTC (rev 185089)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2015-06-02 00:26:35 UTC (rev 185090)
@@ -219,7 +219,11 @@
{
// Create a connection to the WebKit XPC service.
auto connection = adoptOSObject(xpc_connection_create(serviceName(launchOptions, forDevelopment), 0));
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+ xpc_connection_set_oneshot_instance(connection.get(), instanceUUID->uuid);
+#else
xpc_connection_set_instance(connection.get(), instanceUUID->uuid);
+#endif
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
// Inherit UI process localization. It can be different from child process default localization:
@@ -330,14 +334,17 @@
}
#endif
- // Generate the uuid for the service instance we are about to create.
// FIXME: This UUID should be stored on the ChildProcessProxy.
RefPtr<UUIDHolder> instanceUUID = UUIDHolder::create();
// FIXME: It would be nice if we could use OSObjectPtr for this connection as well, but we'd have to be careful
// not to introduce any retain cycles in the call to xpc_connection_set_event_handler below.
xpc_connection_t reExecConnection = xpc_connection_create(serviceName(launchOptions, true), 0);
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+ xpc_connection_set_oneshot_instance(reExecConnection, instanceUUID->uuid);
+#else
xpc_connection_set_instance(reExecConnection, instanceUUID->uuid);
+#endif
// Keep the ProcessLauncher alive while we do the re-execing (balanced in event handler).
that->ref();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes