| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 5de448e994c44c58bd1dff385ebd6ee67c227640..87fc15b0ef48cfbdea3eaa2877db4daf8ee249a7 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -2556,7 +2556,7 @@ bool Document::dispatchBeforeUnloadEvent(ChromeClient& chromeClient, bool& didAl
|
| m_loadEventProgress = BeforeUnloadEventCompleted;
|
| if (!beforeUnloadEvent->defaultPrevented())
|
| defaultEventHandler(beforeUnloadEvent.get());
|
| - if (beforeUnloadEvent->returnValue().isNull())
|
| + if (!frame() || beforeUnloadEvent->returnValue().isNull())
|
| return true;
|
|
|
| if (didAllowNavigation) {
|
|
|