Index: ui/gfx/image/image.cc |
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc |
index 9b59496a0a87b2b32ff18ecd6875eec22c103554..86cc83a31d48e50ad9bc29a21af2a296a278b09d 100644 |
--- a/ui/gfx/image/image.cc |
+++ b/ui/gfx/image/image.cc |
@@ -752,7 +752,12 @@ internal::ImageRep* Image::GetRepresentation( |
void Image::AddRepresentation(scoped_ptr<internal::ImageRep> rep) const { |
CHECK(storage_.get()); |
RepresentationType type = rep->type(); |
- storage_->representations().insert(std::make_pair(type, std::move(rep))); |
+ auto result = |
+ storage_->representations().insert(std::make_pair(type, std::move(rep))); |
+ |
+ // insert should not fail (implies that there was already a representation of |
+ // that type in the map). |
+ CHECK(result.second) << "type was already in map."; |
} |
} // namespace gfx |