Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Issue 9808001: dbus: don't fail when reconnecting object signals (Closed)

Created:
8 years, 9 months ago by keybuk
Modified:
8 years, 9 months ago
Reviewers:
satorux1
CC:
chromium-reviews, bryeung, sadrul, kevers
Visibility:
Public.

Description

dbus: don't fail when reconnecting object signals Since dbus::ObjectProxy is silently cached, with no way to invalidate, it's possible that individual instances of objects will come and go using the same underlying object proxy. i.e. dbus::PropertySet These will need to change the signal callbacks to be bound to their own instance, so the current behaviour of failing in this case with a log message is pessimal. Change dbus::ObjectProxy to overwrite the existing signal callbacks with the new ones on repeated calls, rather than preserve the first. BUG=chromium-os:28064 TEST=unit test included, and we receive property notifications on devices after connection now Change-Id: Ic4ae092163a364c53bdfcf88f4ce8f74b110b5cb R=satorux@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128100

Patch Set 1 #

Total comments: 7

Patch Set 2 : add docs and unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -8 lines) Patch
M dbus/end_to_end_async_unittest.cc View 1 1 chunk +56 lines, -0 lines 0 comments Download
M dbus/object_proxy.h View 1 2 chunks +5 lines, -2 lines 0 comments Download
M dbus/object_proxy.cc View 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
keybuk
8 years, 9 months ago (2012-03-21 02:52:05 UTC) #1
satorux1
http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc File dbus/object_proxy.cc (right): http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc#newcode316 dbus/object_proxy.cc:316: method_table_[absolute_signal_name] = signal_callback; if method_table_[absolute_signal_name] is already present, the ...
8 years, 9 months ago (2012-03-21 04:59:40 UTC) #2
keybuk
http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc File dbus/object_proxy.cc (right): http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc#newcode316 dbus/object_proxy.cc:316: method_table_[absolute_signal_name] = signal_callback; Yes, that's the intent of this ...
8 years, 9 months ago (2012-03-21 14:51:29 UTC) #3
satorux1
http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc File dbus/object_proxy.cc (right): http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc#newcode307 dbus/object_proxy.cc:307: if (match_rules_.find(match_rule) == match_rules_.end()) { When reconnecting to the ...
8 years, 9 months ago (2012-03-21 16:20:28 UTC) #4
keybuk
http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc File dbus/object_proxy.cc (right): http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc#newcode307 dbus/object_proxy.cc:307: if (match_rules_.find(match_rule) == match_rules_.end()) { exactly, which is what ...
8 years, 9 months ago (2012-03-21 16:22:41 UTC) #5
keybuk
http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc File dbus/object_proxy.cc (right): http://codereview.chromium.org/9808001/diff/1/dbus/object_proxy.cc#newcode316 dbus/object_proxy.cc:316: method_table_[absolute_signal_name] = signal_callback; On 2012/03/21 16:20:28, satorux1 wrote: > ...
8 years, 9 months ago (2012-03-21 21:26:28 UTC) #6
satorux1
LGTM
8 years, 9 months ago (2012-03-21 21:53:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/keybuk@chromium.org/9808001/9001
8 years, 9 months ago (2012-03-21 22:06:05 UTC) #8
commit-bot: I haz the power
8 years, 9 months ago (2012-03-21 23:39:19 UTC) #9
Change committed as 128100

Powered by Google App Engine
This is Rietveld 408576698