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

Unified Diff: Source/bindings/core/v8/BindingSecurity.cpp

Issue 1096173003: Print cross-domain access errors on calling window rather than target. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a test Created 5 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
« no previous file with comments | « no previous file | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/BindingSecurity.cpp
diff --git a/Source/bindings/core/v8/BindingSecurity.cpp b/Source/bindings/core/v8/BindingSecurity.cpp
index 61c8742b83008cd4bedacf1fd2bc8b86848c9d37..3f9c7eeae381754d04ed17c45ca0fd4befb6945d 100644
--- a/Source/bindings/core/v8/BindingSecurity.cpp
+++ b/Source/bindings/core/v8/BindingSecurity.cpp
@@ -72,11 +72,8 @@ static bool canAccessDocument(v8::Isolate* isolate, Document* targetDocument, Se
if (isDocumentAccessibleFromDOMWindow(targetDocument, callingWindow))
return true;
- // FIXME: This logic looks unnecessarily convoluted.
- if (reportingOption == ReportSecurityError && targetDocument->domWindow()) {
- if (LocalFrame* frame = targetDocument->frame())
- frame->localDOMWindow()->printErrorMessage(targetDocument->domWindow()->crossDomainAccessErrorMessage(callingWindow));
- }
+ if (reportingOption == ReportSecurityError && targetDocument->domWindow())
+ callingWindow->printErrorMessage(targetDocument->domWindow()->crossDomainAccessErrorMessage(callingWindow));
return false;
}
« no previous file with comments | « no previous file | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698