| Index: Source/core/frame/LocalFrame.cpp
|
| diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
|
| index 5f31f8d36dd6946f8265497f09ac57ec3d4299c2..f5c9e1f7766850c0169148024965911ba33867fd 100644
|
| --- a/Source/core/frame/LocalFrame.cpp
|
| +++ b/Source/core/frame/LocalFrame.cpp
|
| @@ -296,6 +296,18 @@ bool LocalFrame::checkLoadComplete()
|
| return loader().checkLoadCompleteForThisFrame();
|
| }
|
|
|
| +void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const char* reason)
|
| +{
|
| + if (!targetFrame.isLocalFrame())
|
| + return;
|
| +
|
| + 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);
|
| +}
|
| +
|
| void LocalFrame::disconnectOwnerElement()
|
| {
|
| if (owner()) {
|
|
|