Commit 4ca33049 authored by erg@chromium.org's avatar erg@chromium.org

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
parent 243944fd
...@@ -39,7 +39,6 @@ SelectionOwner::~SelectionOwner() { ...@@ -39,7 +39,6 @@ SelectionOwner::~SelectionOwner() {
} }
void SelectionOwner::RetrieveTargets(std::vector<Atom>* targets) { void SelectionOwner::RetrieveTargets(std::vector<Atom>* targets) {
targets->clear();
for (SelectionFormatMap::const_iterator it = format_map_.begin(); for (SelectionFormatMap::const_iterator it = format_map_.begin();
it != format_map_.end(); ++it) { it != format_map_.end(); ++it) {
targets->push_back(it->first); targets->push_back(it->first);
......
...@@ -35,7 +35,7 @@ class UI_BASE_EXPORT SelectionOwner { ...@@ -35,7 +35,7 @@ class UI_BASE_EXPORT SelectionOwner {
// Returns the current selection data. Useful for fast paths. // Returns the current selection data. Useful for fast paths.
const SelectionFormatMap& selection_format_map() { return format_map_; } 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); void RetrieveTargets(std::vector<Atom>* targets);
// Attempts to take ownership of the selection. If we're successful, present // Attempts to take ownership of the selection. If we're successful, present
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment