diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 21:47:00 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 21:47:00 +0000 |
commit | 4ca330499fbb8186a94cef6978897c9310e34660 (patch) | |
tree | a67573d16817f81a76e2c939c6e403a3237d3429 /ui/base | |
parent | 243944fd54d7586087877dcb42bbad01b588f55e (diff) | |
download | chromium_src-4ca330499fbb8186a94cef6978897c9310e34660.zip chromium_src-4ca330499fbb8186a94cef6978897c9310e34660.tar.gz chromium_src-4ca330499fbb8186a94cef6978897c9310e34660.tar.bz2 |
linux_aura: Don't clear target vector in SelectionOwner.
This was causing an intermittent crash in the SelectionClear unit
tests, since it cleared the TARGETS atom out of the list of offered
types
BUG=none
Review URL: https://codereview.chromium.org/129763002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/x/selection_owner.cc | 1 | ||||
-rw-r--r-- | ui/base/x/selection_owner.h | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/ui/base/x/selection_owner.cc b/ui/base/x/selection_owner.cc index 54f59a1..82c98a9 100644 --- a/ui/base/x/selection_owner.cc +++ b/ui/base/x/selection_owner.cc @@ -39,7 +39,6 @@ SelectionOwner::~SelectionOwner() { } void SelectionOwner::RetrieveTargets(std::vector<Atom>* targets) { - targets->clear(); for (SelectionFormatMap::const_iterator it = format_map_.begin(); it != format_map_.end(); ++it) { targets->push_back(it->first); diff --git a/ui/base/x/selection_owner.h b/ui/base/x/selection_owner.h index 6267125..6526597 100644 --- a/ui/base/x/selection_owner.h +++ b/ui/base/x/selection_owner.h @@ -35,7 +35,7 @@ class UI_BASE_EXPORT SelectionOwner { // Returns the current selection data. Useful for fast paths. const SelectionFormatMap& selection_format_map() { return format_map_; } - // Retrieves a list of types we're offering. + // Appends a list of types we're offering to |targets|. void RetrieveTargets(std::vector<Atom>* targets); // Attempts to take ownership of the selection. If we're successful, present |