Index: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
index 044219534e80407a7adc472fe774b3e97af1964e..f9ca9555faa3820f5e563ae988d0c1092644175e 100644 |
--- a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
@@ -231,6 +231,12 @@ bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { |
if (isUnique() || other->isUnique()) |
return false; |
+ if (hasSuborigin() != other->hasSuborigin()) |
+ return false; |
+ |
+ if (hasSuborigin() && suborigin()->name() != other->suborigin()->name()) |
+ return false; |
+ |
// document.domain handling, as per |
// https://html.spec.whatwg.org/multipage/browsers.html#dom-document-domain: |
// |
@@ -257,17 +263,6 @@ bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { |
return canAccess; |
} |
-bool SecurityOrigin::canAccessCheckSuborigins( |
- const SecurityOrigin* other) const { |
- if (hasSuborigin() != other->hasSuborigin()) |
- return false; |
- |
- if (hasSuborigin() && suborigin()->name() != other->suborigin()->name()) |
- return false; |
- |
- return canAccess(other); |
-} |
- |
bool SecurityOrigin::passesFileCheck(const SecurityOrigin* other) const { |
ASSERT(isLocal() && other->isLocal()); |