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

Unified Diff: Source/platform/weborigin/SecurityOriginHash.h

Issue 1180923003: Add window access checks for Suborigins (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests on Windows Created 5 years, 6 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/weborigin/SecurityOrigin.cpp ('k') | Source/platform/weborigin/SecurityOriginTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/SecurityOriginHash.h
diff --git a/Source/platform/weborigin/SecurityOriginHash.h b/Source/platform/weborigin/SecurityOriginHash.h
index f3cb34c69d77b55aa63055d89ca161cf1f596d20..cffa0e7cec61cd27087fc1725cfc427704d2c369 100644
--- a/Source/platform/weborigin/SecurityOriginHash.h
+++ b/Source/platform/weborigin/SecurityOriginHash.h
@@ -38,10 +38,11 @@ namespace blink {
struct SecurityOriginHash {
static unsigned hash(SecurityOrigin* origin)
{
- unsigned hashCodes[3] = {
+ unsigned hashCodes[4] = {
origin->protocol().impl() ? origin->protocol().impl()->hash() : 0,
origin->host().impl() ? origin->host().impl()->hash() : 0,
- origin->port()
+ origin->port(),
+ origin->suboriginName().impl() ? origin->suboriginName().impl()->hash() : 0
};
return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes);
}
@@ -58,7 +59,7 @@ struct SecurityOriginHash {
if (a == b)
return true;
- if (!a->isSameSchemeHostPort(b))
+ if (!a->isSameSchemeHostPortAndSuborigin(b))
return false;
if (a->domainWasSetInDOM() != b->domainWasSetInDOM())
« no previous file with comments | « Source/platform/weborigin/SecurityOrigin.cpp ('k') | Source/platform/weborigin/SecurityOriginTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698