fix: check dbus response for null before use. (#15033)

* fix: backport #15030 to fix #14958 dbus crash

* chore: re-enable power spec tests

* chore: undo changes made to power monitor tests.

The Linux failures on that are gone in master / 4-0-x.  Whatever
resolved it there is unrelated to this PR's changes, so I'm not
going to block this fix on an unrelated issue.
This commit is contained in:
Charles Kerr 2018-10-12 00:40:22 -05:00 committed by Shelley Vohr
parent 6719f66d5a
commit eb8546c8d1
2 changed files with 32 additions and 35 deletions

View file

@ -40,7 +40,6 @@ class PowerObserverLinux : public base::PowerObserver {
base::Callback<bool()> should_shutdown_;
scoped_refptr<dbus::Bus> bus_;
scoped_refptr<dbus::ObjectProxy> logind_;
std::string lock_owner_name_;
base::ScopedFD sleep_lock_;