Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 58de534754dd9b8b3741f0c6bb31b2234003b7e2..b2f7a23828522989625d50c2b4ae00d31a76d10b 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -3068,6 +3068,8 @@ void Document::dispatchUnloadEvents() { |
return; |
if (m_loadEventProgress <= UnloadEventInProgress) { |
+ if (page()) |
+ page()->willUnloadDocument(*this); |
Element* currentFocusedElement = focusedElement(); |
if (isHTMLInputElement(currentFocusedElement)) |
toHTMLInputElement(*currentFocusedElement).endEditing(); |