| Index: Source/core/frame/LocalDOMWindow.cpp
|
| diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
|
| index e347ad1045eab396af17f553cea46caed05003b3..8d0a331f8c7ddcd8c2baec81e6b9814f4d43eac4 100644
|
| --- a/Source/core/frame/LocalDOMWindow.cpp
|
| +++ b/Source/core/frame/LocalDOMWindow.cpp
|
| @@ -83,7 +83,6 @@
|
| #include "core/loader/MixedContentChecker.h"
|
| #include "core/loader/SinkDocument.h"
|
| #include "core/loader/appcache/ApplicationCache.h"
|
| -#include "core/page/BackForwardClient.h"
|
| #include "core/page/Chrome.h"
|
| #include "core/page/ChromeClient.h"
|
| #include "core/page/CreateWindow.h"
|
| @@ -986,7 +985,7 @@ void LocalDOMWindow::close(ExecutionContext* context)
|
| Settings* settings = m_frame->settings();
|
| bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseWindows();
|
|
|
| - if (!(page->openedByDOM() || page->backForward().backForwardListCount() <= 1 || allowScriptsToCloseWindows)) {
|
| + if (!page->openedByDOM() && m_frame->loader().client()->backForwardLength() > 1 && !allowScriptsToCloseWindows) {
|
| frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Scripts may close only the windows that were opened by it."));
|
| return;
|
| }
|
|
|