Make each WRT/MiniBrowser use the unique wayland socket string. 57/12657/2
authorJoone Hur <joone.hur@intel.com>
Wed, 20 Nov 2013 01:24:23 +0000 (17:24 -0800)
committerJoone Hur <joone.hur@intel.com>
Thu, 21 Nov 2013 06:50:09 +0000 (22:50 -0800)
The UIProcess is a Wayland compositor so it creates its own wayland socket string to
communicate with the WebProcess. However, all the UIProcesses create the same wayland
socket string. As a result, the first wrt instance can only render a web page well.

This patch allow to create a unique wayland socket string using process ID
instead of the return value of epoll_create1.

Change-Id: Ie12139d5802e642a5dcf040b0e757152eac534ad

Source/WebCore/platform/graphics/surfaces/wayland/WaylandDisplay.cpp

index 20e334b..64756c8 100644 (file)
@@ -416,7 +416,7 @@ void WaylandDisplay::initialize(wl_display* display)
             return;
         }
 
-        m_socketString.append(String::format("%d", m_eventDispatcher->id()));
+        m_socketString.append(String::format("%d", getpid()));
         if (wl_display_add_socket(m_display, m_socketString.utf8().data())) {
             LOG_ERROR("WaylandDisplay initialization failed:: Failed to Add socket.");
             terminate();