summaryrefslogtreecommitdiffstats
path: root/dbus/property.h
diff options
context:
space:
mode:
authorkeybuk@google.com <keybuk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 23:43:45 +0000
committerkeybuk@google.com <keybuk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 23:43:45 +0000
commit72bbaccaa082a3ad6fff9bbc1cf70d01dabd79e8 (patch)
tree4e166217bf3c9cf8b2f88e518080b74a7ca324bf /dbus/property.h
parent21e0c7bdcf2916d98b5e9668ba6f3e9ddf8b0132 (diff)
downloadchromium_src-72bbaccaa082a3ad6fff9bbc1cf70d01dabd79e8.zip
chromium_src-72bbaccaa082a3ad6fff9bbc1cf70d01dabd79e8.tar.gz
chromium_src-72bbaccaa082a3ad6fff9bbc1cf70d01dabd79e8.tar.bz2
dbus: clear array values before reading from variant
PopArrayFromVariant() appends values to the existing value, rather than clearing first like I expected, so using this without clear() first means the property value accumulates all values and never loses them. BUG=none TEST=unit test included Change-Id: Ie392a89190f4ad8570a905f24b2f446e1f2bed81 R=satorux@chromium.org Review URL: https://chromiumcodereview.appspot.com/9809001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/property.h')
-rw-r--r--dbus/property.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/dbus/property.h b/dbus/property.h
index d46bd8d..2d2cc82 100644
--- a/dbus/property.h
+++ b/dbus/property.h
@@ -386,9 +386,10 @@ class Property : public PropertyBase {
callback.Run(response);
}
- // Updates the cached property value by popping from |reader| which
- // should be positioned at the property value, generally of variant
- // type. Implementation provided by specialization.
+ // Updates the cached property value, replacing any previous value
+ // entirely, by popping from |reader| which should be positioned at the
+ // property value, generally of variant type.
+ // Implementation provided by specialization.
virtual bool PopValueFromReader(MessageReader* reader);
// Appends the passed |value| to |writer|, generally as a variant type.