mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1859865 [Linux] Don't throw error message if DBus operation is canceled r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192319
This commit is contained in:
parent
21f43996b4
commit
ab9de8aaaa
@ -167,9 +167,13 @@ void UPowerClient::BeginListening() {
|
||||
UpdateTrackedDevices();
|
||||
},
|
||||
[](GUniquePtr<GError>&& aError) {
|
||||
g_warning(
|
||||
"Failed to create DBus proxy for org.freedesktop.UPower: %s\n",
|
||||
aError->message);
|
||||
if (!g_error_matches(aError.get(), G_IO_ERROR,
|
||||
G_IO_ERROR_CANCELLED)) {
|
||||
g_warning(
|
||||
"Failed to create DBus proxy for org.freedesktop.UPower: "
|
||||
"%s\n",
|
||||
aError->message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -275,9 +279,12 @@ void UPowerClient::UpdateTrackedDevices() {
|
||||
G_CALLBACK(DeviceChanged), this);
|
||||
},
|
||||
[this](GUniquePtr<GError>&& aError) {
|
||||
g_warning(
|
||||
"Failed to enumerate devices of org.freedesktop.UPower: %s\n",
|
||||
aError->message);
|
||||
if (!g_error_matches(aError.get(), G_IO_ERROR,
|
||||
G_IO_ERROR_CANCELLED)) {
|
||||
g_warning(
|
||||
"Failed to enumerate devices of org.freedesktop.UPower: %s\n",
|
||||
aError->message);
|
||||
}
|
||||
g_signal_connect(mUPowerProxy, "g-signal",
|
||||
G_CALLBACK(DeviceChanged), this);
|
||||
});
|
||||
|
@ -318,9 +318,11 @@ void g_bus_get_callback(GObject* aSourceObject, GAsyncResult* aRes,
|
||||
|
||||
GDBusConnection* conn = g_bus_get_finish(aRes, getter_Transfers(error));
|
||||
if (!conn) {
|
||||
NS_WARNING(nsPrintfCString("Failure at g_bus_get_finish: %s",
|
||||
error ? error->message : "Unknown Error")
|
||||
.get());
|
||||
if (!IsCancelledGError(error.get())) {
|
||||
NS_WARNING(nsPrintfCString("Failure at g_bus_get_finish: %s",
|
||||
error ? error->message : "Unknown Error")
|
||||
.get());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ void nsAppShell::DBusConnectClientResponse(GObject* aObject,
|
||||
RefPtr<GDBusProxy> proxyClient =
|
||||
dont_AddRef(g_dbus_proxy_new_finish(aResult, getter_Transfers(error)));
|
||||
if (!proxyClient) {
|
||||
if (!g_error_matches(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
||||
if (!IsCancelledGError(error.get())) {
|
||||
NS_WARNING(
|
||||
nsPrintfCString("Failed to connect to client: %s\n", error->message)
|
||||
.get());
|
||||
|
@ -196,9 +196,11 @@ class UserIdleServiceMutter : public UserIdleServiceImpl {
|
||||
},
|
||||
[this](GUniquePtr<GError>&& aError) {
|
||||
mPollInProgress = false;
|
||||
g_warning("Failed to call GetIdletime(): %s\n",
|
||||
aError->message);
|
||||
mUserIdleServiceGTK->RejectAndTryNextServiceCallback();
|
||||
if (!IsCancelledGError(aError.get())) {
|
||||
g_warning("Failed to call GetIdletime(): %s\n",
|
||||
aError->message);
|
||||
mUserIdleServiceGTK->RejectAndTryNextServiceCallback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -227,7 +229,9 @@ class UserIdleServiceMutter : public UserIdleServiceImpl {
|
||||
mUserIdleServiceGTK->AcceptServiceCallback();
|
||||
},
|
||||
[this](GUniquePtr<GError>&& aError) {
|
||||
mUserIdleServiceGTK->RejectAndTryNextServiceCallback();
|
||||
if (!IsCancelledGError(aError.get())) {
|
||||
mUserIdleServiceGTK->RejectAndTryNextServiceCallback();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user