Commit b159d73f authored by hashimoto's avatar hashimoto Committed by Commit bot

chromeos: Fix potential crash in SessionManagerClient

ErrorResponse can be null when an error happens locally.
Also, this logging is unnecessary as ObjectProxy::CallMethod is already
doing that.

BUG=642241

Review-Url: https://codereview.chromium.org/2291453006
Cr-Commit-Position: refs/heads/master@{#415591}
parent d434fccf
...@@ -83,10 +83,6 @@ void CreateValidCredConduit(dbus::FileDescriptor* local_auth_fd, ...@@ -83,10 +83,6 @@ void CreateValidCredConduit(dbus::FileDescriptor* local_auth_fd,
remote_auth_fd->CheckValidity(); remote_auth_fd->CheckValidity();
} }
void HandleDBusError(dbus::ErrorResponse* response) {
LOG(ERROR) << "DBus error " << response->ToString();
}
} // namespace } // namespace
// The SessionManagerClient implementation used in production. // The SessionManagerClient implementation used in production.
...@@ -512,12 +508,11 @@ class SessionManagerClientImpl : public SessionManagerClient { ...@@ -512,12 +508,11 @@ class SessionManagerClientImpl : public SessionManagerClient {
// Ownership of local_auth_fd is passed to the callback that is to be // Ownership of local_auth_fd is passed to the callback that is to be
// called on completion of this method call. This keeps the browser end // called on completion of this method call. This keeps the browser end
// of the socket-pair alive for the duration of the RPC. // of the socket-pair alive for the duration of the RPC.
session_manager_proxy_->CallMethodWithErrorCallback( session_manager_proxy_->CallMethod(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&SessionManagerClientImpl::OnRestartJob, base::Bind(&SessionManagerClientImpl::OnRestartJob,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(),
base::Passed(&local_auth_fd)), base::Passed(&local_auth_fd)));
base::Bind(HandleDBusError));
} }
// Called when kSessionManagerRestartJob method is complete. // Called when kSessionManagerRestartJob method is complete.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment