[WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWi...
[WebKit-https.git] / Source / WebDriver / glib / SessionHostGlib.cpp
index c8f0a0e..177aa54 100644 (file)
@@ -174,7 +174,7 @@ void SessionHost::launchBrowser(Function<void (Optional<String> error)>&& comple
     }, this);
 
     GUniquePtr<char> dbusAddress(g_strdup_printf("tcp:host=%s,port=%u", "127.0.0.1", port));
-    connectToBrowser(std::make_unique<ConnectToBrowserAsyncData>(this, WTFMove(dbusAddress), m_cancellable.get(), WTFMove(completionHandler)));
+    connectToBrowser(makeUnique<ConnectToBrowserAsyncData>(this, WTFMove(dbusAddress), m_cancellable.get(), WTFMove(completionHandler)));
 }
 
 void SessionHost::connectToBrowser(std::unique_ptr<ConnectToBrowserAsyncData>&& data)
@@ -383,7 +383,7 @@ void SessionHost::sendMessageToBackend(long messageID, const String& message)
     ASSERT(m_connectionID);
     ASSERT(m_target.id);
 
-    auto messageContext = std::make_unique<MessageContext>(MessageContext { messageID, this });
+    auto messageContext = makeUnique<MessageContext>(MessageContext { messageID, this });
     g_dbus_connection_call(m_dbusConnection.get(), nullptr,
         INSPECTOR_DBUS_OBJECT_PATH,
         INSPECTOR_DBUS_INTERFACE,