Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(756)

Unified Diff: Source/core/dom/Document.cpp

Issue 167123002: Simpler return value from HashTable::add()/HashMap::add() and others (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ChildListMutationScope.cpp ('k') | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 452ee77862f85014bc01b7558ce192e858fbfef5..fc96a78f0691f37a793a74b9fa6f80222c930ef8 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4743,7 +4743,7 @@ CanvasRenderingContext* Document::getCSSCanvasContext(const String& type, const
HTMLCanvasElement* Document::getCSSCanvasElement(const String& name)
{
- RefPtr<HTMLCanvasElement>& element = m_cssCanvasElements.add(name, 0).iterator->value;
+ RefPtr<HTMLCanvasElement>& element = m_cssCanvasElements.add(name, 0).storedValue->value;
if (!element) {
element = HTMLCanvasElement::create(*this);
element->setAccelerationDisabled(true);
@@ -5326,8 +5326,8 @@ Locale& Document::getCachedLocale(const AtomicString& locale)
return Locale::defaultLocale();
LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey, nullptr);
if (result.isNewEntry)
- result.iterator->value = Locale::create(localeKey);
- return *(result.iterator->value);
+ result.storedValue->value = Locale::create(localeKey);
+ return *(result.storedValue->value);
}
Document& Document::ensureTemplateDocument()
« no previous file with comments | « Source/core/dom/ChildListMutationScope.cpp ('k') | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698