Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Unified Diff: Source/core/dom/Document.cpp

Issue 22893051: Add support for BeforeUnloadEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9eae59b33bc68d1871fca5c874997b604cf72652..32efe9ac61556c692b16f04bd2e9fdd09a945a44 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2337,7 +2337,7 @@ bool Document::dispatchBeforeUnloadEvent(Chrome& chrome, Document* navigatingDoc
m_loadEventProgress = BeforeUnloadEventCompleted;
if (!beforeUnloadEvent->defaultPrevented())
defaultEventHandler(beforeUnloadEvent.get());
- if (beforeUnloadEvent->result().isNull())
+ if (beforeUnloadEvent->returnValue().isNull())
return true;
if (navigatingDocument->m_didAllowNavigationViaBeforeUnloadConfirmationPanel) {
@@ -2345,7 +2345,7 @@ bool Document::dispatchBeforeUnloadEvent(Chrome& chrome, Document* navigatingDoc
return true;
}
- String text = displayStringModifiedByEncoding(beforeUnloadEvent->result());
+ String text = displayStringModifiedByEncoding(beforeUnloadEvent->returnValue());
if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) {
navigatingDocument->m_didAllowNavigationViaBeforeUnloadConfirmationPanel = true;
return true;

Powered by Google App Engine
This is Rietveld 408576698