[webkit-reviews] review granted: [Bug 228056] [GLib] Remove libportal dependency : [Attachment 434008] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 23 02:22:24 PDT 2021


Carlos Garcia Campos <cgarcia at igalia.com> has granted Philippe Normand
<pnormand at igalia.com>'s request for review:
Bug 228056: [GLib] Remove libportal dependency
https://bugs.webkit.org/show_bug.cgi?id=228056

Attachment 434008: Patch

https://bugs.webkit.org/attachment.cgi?id=434008&action=review




--- Comment #16 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 434008
  --> https://bugs.webkit.org/attachment.cgi?id=434008
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434008&action=review

>
Source/WebCore/platform/mediastream/gstreamer/GStreamerDisplayCaptureDeviceMana
ger.cpp:72
> +    m_proxy = adoptGRef(g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION,
> +	  
static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS |
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES), nullptr,
> +	   "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop",
"org.freedesktop.portal.ScreenCast", nullptr, nullptr));

Sorry that I didn't notice this in previous reviews but we should handle errors
here.

>
Source/WebCore/platform/mediastream/gstreamer/GStreamerDisplayCaptureDeviceMana
ger.cpp:83
> +    GUniqueOutPtr<GError> error;
> +    auto result = adoptGRef(g_dbus_proxy_call_sync(m_proxy.get(),
"CreateSession", g_variant_new("(a{sv})", &options),
> +	   G_DBUS_CALL_FLAGS_NONE, s_dbusCallTimeout.millisecondsAs<int>(),
nullptr, &error.outPtr()));

This error here isn't handled either.

>
Source/WebCore/platform/mediastream/gstreamer/GStreamerDisplayCaptureDeviceMana
ger.cpp:159
> +    auto proxy = adoptGRef(g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION,
> +	  
static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS |
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES), nullptr,
> +	   "org.freedesktop.portal.Desktop", session->path.ascii().data(),
"org.freedesktop.portal.Session", nullptr, nullptr));

And here proxy could null too if g_dbus_proxy_new_for_bus_sync fails


More information about the webkit-reviews mailing list