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

Unified Diff: Source/platform/weborigin/SecurityPolicy.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/platform/network/WebSocketHandshakeRequest.cpp ('k') | Source/wtf/HashCountedSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/SecurityPolicy.cpp
diff --git a/Source/platform/weborigin/SecurityPolicy.cpp b/Source/platform/weborigin/SecurityPolicy.cpp
index e9d717f30d4a04571d1a81d83dfd7865fe2d3772..4563595f01d45e09363e7ea943dcc71ce4a4385f 100644
--- a/Source/platform/weborigin/SecurityPolicy.cpp
+++ b/Source/platform/weborigin/SecurityPolicy.cpp
@@ -120,9 +120,9 @@ void SecurityPolicy::addOriginAccessWhitelistEntry(const SecurityOrigin& sourceO
String sourceString = sourceOrigin.toString();
OriginAccessMap::AddResult result = originAccessMap().add(sourceString, nullptr);
if (result.isNewEntry)
- result.iterator->value = adoptPtr(new OriginAccessWhiteList);
+ result.storedValue->value = adoptPtr(new OriginAccessWhiteList);
- OriginAccessWhiteList* list = result.iterator->value.get();
+ OriginAccessWhiteList* list = result.storedValue->value.get();
list->append(OriginAccessEntry(destinationProtocol, destinationDomain, allowDestinationSubdomains ? OriginAccessEntry::AllowSubdomains : OriginAccessEntry::DisallowSubdomains, OriginAccessEntry::TreatIPAddressAsIPAddress));
}
« no previous file with comments | « Source/platform/network/WebSocketHandshakeRequest.cpp ('k') | Source/wtf/HashCountedSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698