Comment 12 for bug 857153

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Comment on attachment 568753
Proposed patch.

Review of attachment 568753:
-----------------------------------------------------------------

::: accessible/src/atk/nsApplicationAccessibleWrap.cpp
@@ +618,5 @@
> +test_a11y_dbus (bool *out)
> +{
> + // XXX following code is copied from widget/src/gtk2/nsWindow.cpp
> + // we should put it somewhere that can be used from both modules
> + // see bug 390761

Why not fix this now? You can just make the widget version nonstatic and call it from here.

@@ +625,5 @@
> + DBusConnection *bus;
> + DBusMessage *message = NULL, *reply = NULL;
> + DBusMessageIter iter, iter_variant, iter_struct;
> + dbus_bool_t d_result;
> + DBusError error;

This is C++ code, just declare these where they're first assigned wherever possible

@@ +627,5 @@
> + DBusMessageIter iter, iter_variant, iter_struct;
> + dbus_bool_t d_result;
> + DBusError error;
> + const char *iface = "org.a11y.Status";
> + const char *member = "IsEnabled";

static const char iface[] = ...;
static const char member[] = ...;

@@ +636,5 @@
> + goto exit;
> +
> + message = dbus_message_new_method_call ("org.a11y.Bus", "/org/a11y/bus",
> + "org.freedesktop.DBus.Properties",
> + "Get");

How fast is this? We're calling this on every widget creation, could this be slow?