[WPE] Do not create a PlatformDisplay in the Service Worker process
[WebKit-https.git] / Source / WebKit / WebProcess / glib / WebProcessGLib.cpp
index 192a117..fe896e2 100644 (file)
@@ -50,11 +50,14 @@ void WebProcess::platformSetCacheModel(CacheModel cacheModel)
 void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters&& parameters)
 {
 #if PLATFORM(WPE)
-    auto& implementationLibraryName = parameters.implementationLibraryName;
-    if (!implementationLibraryName.isNull() && implementationLibraryName.data()[0] != '\0')
-        wpe_loader_init(parameters.implementationLibraryName.data());
-    RELEASE_ASSERT(is<PlatformDisplayLibWPE>(PlatformDisplay::sharedDisplay()));
-    downcast<PlatformDisplayLibWPE>(PlatformDisplay::sharedDisplay()).initialize(parameters.hostClientFileDescriptor.releaseFileDescriptor());
+    if (!parameters.isServiceWorkerProcess) {
+        auto& implementationLibraryName = parameters.implementationLibraryName;
+        if (!implementationLibraryName.isNull() && implementationLibraryName.data()[0] != '\0')
+            wpe_loader_init(parameters.implementationLibraryName.data());
+
+        RELEASE_ASSERT(is<PlatformDisplayLibWPE>(PlatformDisplay::sharedDisplay()));
+        downcast<PlatformDisplayLibWPE>(PlatformDisplay::sharedDisplay()).initialize(parameters.hostClientFileDescriptor.releaseFileDescriptor());
+    }
 #endif
 #if PLATFORM(WAYLAND)
     m_waylandCompositorDisplay = WaylandCompositorDisplay::create(parameters.waylandCompositorDisplayName);