[Webkit-unassigned] [Bug 248727] gdesktopappinfo.h not excluded on macOS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 5 10:29:11 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=248727

Michael Catanzaro <mcatanzaro at gnome.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at gnome.org

--- Comment #1 from Michael Catanzaro <mcatanzaro at gnome.org> ---
Please test this:

diff --git a/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp b/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp
index 61e4c5e50cb8..0b34a2041193 100644
--- a/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp
+++ b/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp
@@ -31,7 +31,6 @@
 #include <WebCore/NotificationResources.h>
 #include <WebCore/RefPtrCairo.h>
 #include <cairo.h>
-#include <gio/gdesktopappinfo.h>
 #include <gio/gio.h>
 #include <glib/gi18n-lib.h>
 #include <mutex>
@@ -51,6 +50,10 @@
 #include <WebCore/GtkVersioning.h>
 #endif

+#if OS(UNIX)
+#include <gio/gdesktopappinfo.h>
+#endif
+
 namespace WebKit {

 static const Seconds s_dbusCallTimeout = 20_ms;
@@ -293,6 +296,7 @@ void NotificationService::processCapabilities(GVariant* variant)

 static const char* applicationIcon(const char* applicationID)
 {
+#if OS(UNIX)
     static std::optional<CString> appIcon;
     if (!appIcon) {
         appIcon = [applicationID]() -> CString {
@@ -330,6 +334,9 @@ static const char* applicationIcon(const char* applicationID)
     }

     return appIcon->data();
+#else
+    return { };
+#endif
 }

 bool NotificationService::showNotification(const WebNotification& notification, const RefPtr<WebCore::NotificationResources>& resources)


If that works for you, I'll submit a merge request.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221205/f9786fa6/attachment.htm>


More information about the webkit-unassigned mailing list