Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 4294b0b790cc03d931a4bfdf0e935993b5901ee8..dc5974ba26fa9533ccc3859d07c7794ee1d1ad18 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -2640,7 +2640,8 @@ void Document::open(Document* enteredDocument, ExceptionState& exceptionState) { |
} |
if (enteredDocument) { |
- if (!getSecurityOrigin()->canAccess(enteredDocument->getSecurityOrigin())) { |
+ if (!getSecurityOrigin()->isSameSchemeHostPortAndSuborigin( |
+ enteredDocument->getSecurityOrigin())) { |
exceptionState.throwSecurityError( |
"Can only call open() on same-origin documents."); |
return; |