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

Unified Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 2805683005: Merge SecurityOrigin::canAccessCheckSuborigins into canAccess (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/core/frame/DOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
index 831460a2baca733a3cd921b9204c230d89fc9d23..0507b7d1252c0ce4a0802558acecedf63a0be698 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -137,9 +137,10 @@ bool DOMWindow::isInsecureScriptAccess(LocalDOMWindow& callingWindow,
// FIXME: The name canAccess seems to be a roundabout way to ask "can
// execute script". Can we name the SecurityOrigin function better to make
// this more clear?
- if (callingWindow.document()->getSecurityOrigin()->canAccessCheckSuborigins(
- frame()->securityContext()->getSecurityOrigin()))
+ if (callingWindow.document()->getSecurityOrigin()->canAccess(
+ frame()->securityContext()->getSecurityOrigin())) {
return false;
+ }
}
callingWindow.printErrorMessage(
@@ -270,8 +271,7 @@ String DOMWindow::crossDomainAccessErrorMessage(
// It's possible for a remote frame to be same origin with respect to a
// local frame, but it must still be treated as a disallowed cross-domain
// access. See https://crbug.com/601629.
- ASSERT(frame()->isRemoteFrame() ||
- !activeOrigin->canAccessCheckSuborigins(targetOrigin));
+ DCHECK(frame()->isRemoteFrame() || !activeOrigin->canAccess(targetOrigin));
String message = "Blocked a frame with origin \"" + activeOrigin->toString() +
"\" from accessing a frame with origin \"" +

Powered by Google App Engine
This is Rietveld 408576698