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 218fbb4fc990ab0f36a65a55e3ae4411379dc5da..388eaebe1943dec684220d1b980938889fc313cb 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -3078,6 +3078,8 @@ void Document::dispatchUnloadEvents() { |
return; |
if (m_loadEventProgress <= UnloadEventInProgress) { |
+ if (page()) |
+ page()->willUnloadDocument(*this); |
Element* currentFocusedElement = focusedElement(); |
if (isHTMLInputElement(currentFocusedElement)) |
toHTMLInputElement(*currentFocusedElement).endEditing(); |