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

Issue 9508005: dbus: verify object path of incoming signals (Closed)

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

Description

dbus: verify object path of incoming signals The existing behavior, while convenient for debugging, is wrong. D-Bus will not call any further filter functions once one returns DBUS_HANDLER_RESULT_HANDLED, in order for the next to be called a filter must return DBUS_HANDLER_RESULT_NOT_YET_HANDLED if it does not handle the incoming signal. We also can't defer this to the signal function since we have to post that to a different thread, and return values get hard. Since object proxies are constructed per-path, and match common interfaces and members, this means signals must be matched on an object otherwise only the first registered object proxy for any client will be called, and will be called for all signals. BUG=chromium-os:27113 TEST=ran unit tests, and manually verified existing code that uses ConnectToSignal Change-Id: Ia4cbc064dff0421a37fe4c4b7c719acf25eb630c Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=124357

Patch Set 1 #

Total comments: 2

Patch Set 2 : adjust unit test to test the new behavior, reather than removing #

Total comments: 3

Patch Set 3 : replace test with one that verifies signal delivery to the right sender #

Total comments: 2

Patch Set 4 : comment fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -12 lines) Patch
M dbus/end_to_end_async_unittest.cc View 1 2 3 4 chunks +38 lines, -5 lines 0 comments Download
M dbus/object_proxy.cc View 2 chunks +11 lines, -7 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
keybuk
8 years, 9 months ago (2012-02-29 01:13:48 UTC) #1
satorux1
http://codereview.chromium.org/9508005/diff/1/dbus/end_to_end_async_unittest.cc File dbus/end_to_end_async_unittest.cc (left): http://codereview.chromium.org/9508005/diff/1/dbus/end_to_end_async_unittest.cc#oldcode312 dbus/end_to_end_async_unittest.cc:312: } Rather than removing it, can you write a ...
8 years, 9 months ago (2012-02-29 06:18:23 UTC) #2
keybuk
http://codereview.chromium.org/9508005/diff/1/dbus/end_to_end_async_unittest.cc File dbus/end_to_end_async_unittest.cc (left): http://codereview.chromium.org/9508005/diff/1/dbus/end_to_end_async_unittest.cc#oldcode312 dbus/end_to_end_async_unittest.cc:312: } On 2012/02/29 06:18:24, satorux1 wrote: > Rather than ...
8 years, 9 months ago (2012-03-01 00:10:45 UTC) #3
satorux1
http://codereview.chromium.org/9508005/diff/6001/dbus/end_to_end_async_unittest.cc File dbus/end_to_end_async_unittest.cc (right): http://codereview.chromium.org/9508005/diff/6001/dbus/end_to_end_async_unittest.cc#newcode322 dbus/end_to_end_async_unittest.cc:322: WaitForTestSignalOrTimeout(timeout_ms); Does this mean the test takes 5 seconds ...
8 years, 9 months ago (2012-03-01 00:14:32 UTC) #4
keybuk
http://codereview.chromium.org/9508005/diff/6001/dbus/end_to_end_async_unittest.cc File dbus/end_to_end_async_unittest.cc (right): http://codereview.chromium.org/9508005/diff/6001/dbus/end_to_end_async_unittest.cc#newcode322 dbus/end_to_end_async_unittest.cc:322: WaitForTestSignalOrTimeout(timeout_ms); yes. action_timeout_ms is 10s, which is even longer ...
8 years, 9 months ago (2012-03-01 00:15:22 UTC) #5
satorux1
http://codereview.chromium.org/9508005/diff/6001/dbus/end_to_end_async_unittest.cc File dbus/end_to_end_async_unittest.cc (right): http://codereview.chromium.org/9508005/diff/6001/dbus/end_to_end_async_unittest.cc#newcode322 dbus/end_to_end_async_unittest.cc:322: WaitForTestSignalOrTimeout(timeout_ms); On 2012/03/01 00:15:22, keybuk wrote: > yes. > ...
8 years, 9 months ago (2012-03-01 00:23:46 UTC) #6
keybuk
I have a better idea...
8 years, 9 months ago (2012-03-01 00:25:35 UTC) #7
satorux1
LGTM https://chromiumcodereview.appspot.com/9508005/diff/7004/dbus/end_to_end_async_unittest.cc File dbus/end_to_end_async_unittest.cc (right): https://chromiumcodereview.appspot.com/9508005/diff/7004/dbus/end_to_end_async_unittest.cc#newcode336 dbus/end_to_end_async_unittest.cc:336: // arrives from a different object path like ...
8 years, 9 months ago (2012-03-01 00:36:16 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/keybuk@chromium.org/9508005/7006
8 years, 9 months ago (2012-03-01 00:39:23 UTC) #9
commit-bot: I haz the power
8 years, 9 months ago (2012-03-01 04:01:06 UTC) #10
Change committed as 124357

Powered by Google App Engine
This is Rietveld 408576698