chromeos-dbus-bindings: Add destructor for ObjectManagerProxy

Previously, the generated ObjectManagerProxy was registering interfaces
with its wrapped ObjectManager instance but not unregistering them. The
registered interfaces were using the ObjectManagerProxy pointer to
create new property sets for the given interfaces. Unfortunately, this
led to a race where:

1) ObjectManagerProxy is destroyed
2) dbus::Bus object receives a signal that new interface has been added
3) ObjectManager instance previously wrapped by ObjectManagerProxy deferences
   the pointer to the ObjectManagerProxy (now invalid)
4) Terrible things happen here.

BUG=None
TEST=generated proxies still compile.

Change-Id: Ie1da0955088606d5cd41a1bffc131b114dc1f173
Reviewed-on: https://chromium-review.googlesource.com/236885
Commit-Queue: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
3 files changed
tree: d29ae02cb1a809a4f68a113d6fb2b3d128156462
  1. chromeos-dbus-bindings/