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

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

Issue 1171363002: Fix null pointer dereference in ChromeClientImpl::openBeforeUnloadConfirmPanelDelegate. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « LayoutTests/fast/events/before-unload-crash-expected.txt ('k') | Source/core/page/ChromeClient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « LayoutTests/fast/events/before-unload-crash-expected.txt ('k') | Source/core/page/ChromeClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698