Index: Source/core/frame/DOMWindow.cpp |
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp |
index 5354c67cee624e87d8a82bd76d0ba859f61202c6..dc4372c1c05f4f4db3b037be0399c981f878aaeb 100644 |
--- a/Source/core/frame/DOMWindow.cpp |
+++ b/Source/core/frame/DOMWindow.cpp |
@@ -892,8 +892,10 @@ void DOMWindow::close(ExecutionContext* context) |
Settings* settings = m_frame->settings(); |
bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseWindows(); |
- if (!(page->openedByDOM() || page->backForward().backForwardListCount() <= 1 || allowScriptsToCloseWindows)) |
+ if (!(page->openedByDOM() || page->backForward().backForwardListCount() <= 1 || allowScriptsToCloseWindows)) { |
+ pageConsole()->addMessage(JSMessageSource, WarningMessageLevel, "Scripts may close only the windows that were opened by it."); |
return; |
+ } |
if (!m_frame->loader().shouldClose()) |
return; |