Get rid of a 6 year old compiler workaround
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 22:30:37 +0000 (22:30 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 22:30:37 +0000 (22:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154198

Reviewed by Sam Weinig.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::createService):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196511 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm

index 90fdf5a..5e495b6 100644 (file)
@@ -1,5 +1,16 @@
 2016-02-12  Anders Carlsson  <andersca@apple.com>
 
+        Get rid of a 6 year old compiler workaround
+        https://bugs.webkit.org/show_bug.cgi?id=154198
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::connectToService):
+        (WebKit::createService):
+
+2016-02-12  Anders Carlsson  <andersca@apple.com>
+
         Fix ASan build.
 
         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
index f808c53..8023b7d 100644 (file)
 
 namespace WebKit {
 
-namespace {
-
-struct UUIDHolder : public RefCounted<UUIDHolder> {
-    static Ref<UUIDHolder> create()
-    {
-        return adoptRef(*new UUIDHolder);
-    }
-
-    UUIDHolder()
-    {
-        uuid_generate(uuid);
-    }
-
-    uuid_t uuid;
-};
-
-}
-
 typedef void (ProcessLauncher::*DidFinishLaunchingProcessFunction)(PlatformProcessIdentifier, IPC::Connection::Identifier);
 
 static const char* serviceName(const ProcessLauncher::LaunchOptions& launchOptions)
@@ -100,11 +82,14 @@ static bool shouldLeakBoost(const ProcessLauncher::LaunchOptions& launchOptions)
 #endif
 }
     
-static void connectToService(const ProcessLauncher::LaunchOptions& launchOptions, bool forDevelopment, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction, UUIDHolder* instanceUUID)
+static void connectToService(const ProcessLauncher::LaunchOptions& launchOptions, bool forDevelopment, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
 {
     // Create a connection to the WebKit XPC service.
     auto connection = adoptOSObject(xpc_connection_create(serviceName(launchOptions), 0));
-    xpc_connection_set_oneshot_instance(connection.get(), instanceUUID->uuid);
+
+    uuid_t uuid;
+    uuid_generate(uuid);
+    xpc_connection_set_oneshot_instance(connection.get(), uuid);
 
     // Inherit UI process localization. It can be different from child process default localization:
     // 1. When the application and system frameworks simply have different localized resources available, we should match the application.
@@ -213,10 +198,7 @@ static void connectToService(const ProcessLauncher::LaunchOptions& launchOptions
 
 static void createService(const ProcessLauncher::LaunchOptions& launchOptions, bool forDevelopment, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
 {
-    // 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();
-    connectToService(launchOptions, forDevelopment, that, didFinishLaunchingProcessFunction, instanceUUID.get());
+    connectToService(launchOptions, forDevelopment, that, didFinishLaunchingProcessFunction);
 }
 
 static NSString *systemDirectoryPath()