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

Unified Diff: Source/core/frame/LocalFrame.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 | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index 7db8dacf32c39f5d4ed28b8214325df0a961e253..07300d64e4fe273895d46672128e44639695c387 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -293,8 +293,7 @@ void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha
const LocalFrame& targetLocalFrame = toLocalFrameTemporary(targetFrame);
String message = "Unsafe JavaScript attempt to initiate navigation for frame with URL '" + targetLocalFrame.document()->url().string() + "' from frame with URL '" + document()->url().string() + "'. " + reason + "\n";
- // FIXME: should we print to the console of the document performing the navigation instead?
- targetLocalFrame.localDOMWindow()->printErrorMessage(message);
+ localDOMWindow()->printErrorMessage(message);
}
bool LocalFrame::isLoadingAsChild() const
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698