summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2015-09-08 16:59:47 +0000
committerPeter Qiu <zqiu@google.com>2015-09-08 17:07:49 +0000
commitb04415c9c7edc9a9474ee4d59956fd01798eb302 (patch)
tree5f9082151c18d91e552aa653349b30e1829b6f7f
parenta31c5257ce2673c8cdcb8e43e2a1dd40e926009d (diff)
downloaddbus-binding-generator-b04415c9c7edc9a9474ee4d59956fd01798eb302.tar.gz
Revert "chromeos-dbus-bindings: remove object proxy from bus in proxy destructor"
This reverts commit a31c5257ce2673c8cdcb8e43e2a1dd40e926009d. The original CL breaks some system services (such as crash_reporter) in Chrome OS. Instead, fix the original issue by explicitly calling XXXProxy::ReleaseObjectProxy. BUG=23560086 Change-Id: I90c7c1cecc5132bd3d78be77cbe79ad45f41a99d
-rw-r--r--chromeos-dbus-bindings/proxy_generator.cc6
-rw-r--r--chromeos-dbus-bindings/proxy_generator_unittest.cc16
2 files changed, 0 insertions, 22 deletions
diff --git a/chromeos-dbus-bindings/proxy_generator.cc b/chromeos-dbus-bindings/proxy_generator.cc
index 396c3d0..717740d 100644
--- a/chromeos-dbus-bindings/proxy_generator.cc
+++ b/chromeos-dbus-bindings/proxy_generator.cc
@@ -399,12 +399,6 @@ void ProxyGenerator::AddDestructor(const string& class_name,
IndentedText* text) {
IndentedText block;
block.AddLine(StringPrintf("~%s() override {", class_name.c_str()));
- block.PushOffset(kBlockOffset);
- block.AddLine("bus_->RemoveObjectProxy(");
- block.AddLineWithOffset(
- "service_name_, object_path_, base::Bind(&base::DoNothing));",
- kLineContinuationOffset);
- block.PopOffset();
block.AddLine("}");
text->AddBlock(block);
}
diff --git a/chromeos-dbus-bindings/proxy_generator_unittest.cc b/chromeos-dbus-bindings/proxy_generator_unittest.cc
index 9eb930f..75b7e9f 100644
--- a/chromeos-dbus-bindings/proxy_generator_unittest.cc
+++ b/chromeos-dbus-bindings/proxy_generator_unittest.cc
@@ -138,8 +138,6 @@ class TestInterfaceProxy final : public TestInterfaceProxyInterface {
}
~TestInterfaceProxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void RegisterCloserSignalHandler(
@@ -350,8 +348,6 @@ class TestInterface2Proxy final : public TestInterface2ProxyInterface {
}
~TestInterface2Proxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void ReleaseObjectProxy(const base::Closure& callback) {
@@ -456,8 +452,6 @@ class TestInterfaceProxy final : public TestInterfaceProxyInterface {
}
~TestInterfaceProxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void RegisterCloserSignalHandler(
@@ -521,8 +515,6 @@ class TestInterface2Proxy final : public TestInterface2ProxyInterface {
}
~TestInterface2Proxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void ReleaseObjectProxy(const base::Closure& callback) {
@@ -629,8 +621,6 @@ class Itf1Proxy final : public Itf1ProxyInterface {
}
~Itf1Proxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void RegisterCloserSignalHandler(
@@ -730,8 +720,6 @@ class Itf2Proxy final : public Itf2ProxyInterface {
}
~Itf2Proxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void ReleaseObjectProxy(const base::Closure& callback) {
@@ -1005,8 +993,6 @@ class Itf1Proxy final : public Itf1ProxyInterface {
}
~Itf1Proxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void RegisterCloserSignalHandler(
@@ -1084,8 +1070,6 @@ class Itf2Proxy final : public Itf2ProxyInterface {
}
~Itf2Proxy() override {
- bus_->RemoveObjectProxy(
- service_name_, object_path_, base::Bind(&base::DoNothing));
}
void ReleaseObjectProxy(const base::Closure& callback) {