Index: third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp |
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp |
index b148192312a81eebf0cc72b88d70d1db5bf9aec9..ef229d26f6d9c6961f968a99d3b5723c3ca2629c 100644 |
--- a/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp |
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp |
@@ -179,8 +179,10 @@ bool SecurityPolicy::IsUrlWhiteListedTrustworthy(const KURL& url) { |
bool SecurityPolicy::IsAccessWhiteListed(const SecurityOrigin* active_origin, |
const SecurityOrigin* target_origin) { |
- if (OriginAccessWhiteList* list = |
- GetOriginAccessMap().at(active_origin->ToString())) { |
+ const OriginAccessMap& map = GetOriginAccessMap(); |
+ if (map.IsEmpty()) |
+ return false; |
+ if (OriginAccessWhiteList* list = map.at(active_origin->ToString())) { |
for (size_t i = 0; i < list->size(); ++i) { |
if (list->at(i).MatchesOrigin(*target_origin) != |
OriginAccessEntry::kDoesNotMatchOrigin) |