diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp index dce6e3e32ca5..8dda48b0c220 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit/UIProcess/WebPageProxy.cpp @@ -8938,7 +8938,7 @@ static Span gpuMachServices() #endif // PLATFORM(COCOA) #if PLATFORM(COCOA) && !ENABLE(WEBCONTENT_GPU_SANDBOX_EXTENSIONS_BLOCKING) || HAVE(MACH_BOOTSTRAP_EXTENSION) -static bool shouldBlockIOKit(const WebPreferences& preferences) +static bool shouldBlockIOKit(const WebPreferences& preferences, DrawingAreaType drawingAreaType) { if (!preferences.useGPUProcessForMediaEnabled() || (!preferences.captureVideoInGPUProcessEnabled() && !preferences.captureVideoInUIProcessEnabled()) @@ -8946,7 +8946,8 @@ static bool shouldBlockIOKit(const WebPreferences& preferences) || !preferences.webRTCPlatformCodecsInGPUProcessEnabled() || !preferences.useGPUProcessForCanvasRenderingEnabled() || !preferences.useGPUProcessForDOMRenderingEnabled() - || !preferences.useGPUProcessForWebGLEnabled()) + || !preferences.useGPUProcessForWebGLEnabled() + || drawingAreaType != DrawingAreaType::RemoteLayerTree) return false; return true; } @@ -9049,7 +9050,7 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc parameters.additionalSupportedImageTypes = m_configuration->additionalSupportedImageTypes(); #if !ENABLE(WEBCONTENT_GPU_SANDBOX_EXTENSIONS_BLOCKING) - if (!shouldBlockIOKit(preferences())) { + if (!shouldBlockIOKit(preferences(), drawingArea.type())) { parameters.gpuIOKitExtensionHandles = SandboxExtension::createHandlesForIOKitClassExtensions(gpuIOKitClasses(), std::nullopt); parameters.gpuMachExtensionHandles = SandboxExtension::createHandlesForMachLookup(gpuMachServices(), std::nullopt); } @@ -9191,7 +9192,7 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc #else bool createBootstrapExtension = !parameters.store.getBoolValueForKey(WebPreferencesKey::experimentalSandboxEnabledKey()); #endif - if (!shouldBlockIOKit(preferences()) || createBootstrapExtension) + if (!shouldBlockIOKit(preferences(), drawingArea.type()) || createBootstrapExtension) parameters.machBootstrapHandle = SandboxExtension::createHandleForMachBootstrapExtension(); #endif return parameters;