Index: ui/base/resource/resource_bundle_ios.mm |
diff --git a/ui/base/resource/resource_bundle_ios.mm b/ui/base/resource/resource_bundle_ios.mm |
index 6ffb68754d951fbf4d553b23602034f41d42b930..a2e9295d9b02e95a2134e8570453b2b9f439b5e9 100644 |
--- a/ui/base/resource/resource_bundle_ios.mm |
+++ b/ui/base/resource/resource_bundle_ios.mm |
@@ -90,13 +90,12 @@ base::FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale, |
} |
gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) { |
+ DCHECK(sequence_checker_.CalledOnValidSequence()); |
+ |
// Check to see if the image is already in the cache. |
- { |
- base::AutoLock lock(*images_and_fonts_lock_); |
- ImageMap::iterator found = images_.find(resource_id); |
- if (found != images_.end()) { |
- return found->second; |
- } |
+ ImageMap::iterator found = images_.find(resource_id); |
+ if (found != images_.end()) { |
+ return found->second; |
} |
gfx::Image image; |
@@ -166,7 +165,7 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) { |
image = gfx::Image(ui_image, base::scoped_policy::RETAIN); |
} |
- base::AutoLock lock(*images_and_fonts_lock_); |
+ DCHECK(sequence_checker_.CalledOnValidSequence()); |
// Another thread raced the load and has already cached the image. |
if (images_.count(resource_id)) |