Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 5dff7d9be6b17f60c61c6dafcbe06da45d9792d9..c9df01d4efa2414631c9617e538ca2be19576d82 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2581,6 +2581,9 @@ bool Document::dispatchBeforeUnloadEvent(Chrome& chrome, bool& didAllowNavigatio |
if (!body()) |
return true; |
+ if (processingBeforeUnload()) |
+ return false; |
+ |
RefPtrWillBeRawPtr<Document> protect(this); |
RefPtrWillBeRawPtr<BeforeUnloadEvent> beforeUnloadEvent = BeforeUnloadEvent::create(); |