base::SupportsUserData owns the base::SupportsUserData::Data objects passed to SetUserData() but does not enforce this. This is documented in the method comment, but could be enforced by changing the method to take the parameter as a std::unique_ptr<>.
This would make the API safer (as there won't be a risk of double-delete of the Data object).
Comment 1 by bugdroid1@chromium.org
, Feb 13 2017