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

Side by Side Diff: Source/core/page/ChromeClient.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // otherwise cause the load to continue while we're in the middle of 105 // otherwise cause the load to continue while we're in the middle of
106 // executing JavaScript. 106 // executing JavaScript.
107 ScopedPageLoadDeferrer deferrer; 107 ScopedPageLoadDeferrer deferrer;
108 108
109 ScopedJavaScriptDialogInstrumentation instrumentation(frame, message); 109 ScopedJavaScriptDialogInstrumentation instrumentation(frame, message);
110 return (chromeClient->*function)(&frame, message, parameters...); 110 return (chromeClient->*function)(&frame, message, parameters...);
111 } 111 }
112 112
113 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, LocalFram e* frame) 113 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, LocalFram e* frame)
114 { 114 {
115 ASSERT(frame);
115 return openJavaScriptDialog(this, &ChromeClient::openBeforeUnloadConfirmPane lDelegate, *frame, message); 116 return openJavaScriptDialog(this, &ChromeClient::openBeforeUnloadConfirmPane lDelegate, *frame, message);
116 } 117 }
117 118
118 void ChromeClient::openJavaScriptAlert(LocalFrame* frame, const String& message) 119 void ChromeClient::openJavaScriptAlert(LocalFrame* frame, const String& message)
119 { 120 {
120 ASSERT(frame); 121 ASSERT(frame);
121 if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::Al ertDialog, message)) 122 if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::Al ertDialog, message))
122 return; 123 return;
123 openJavaScriptDialog(this, &ChromeClient::openJavaScriptAlertDelegate, *fram e, message); 124 openJavaScriptDialog(this, &ChromeClient::openJavaScriptAlertDelegate, *fram e, message);
124 } 125 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 { 186 {
186 // Defer loads in case the client method runs a new event loop that would 187 // Defer loads in case the client method runs a new event loop that would
187 // otherwise cause the load to continue while we're in the middle of 188 // otherwise cause the load to continue while we're in the middle of
188 // executing JavaScript. 189 // executing JavaScript.
189 ScopedPageLoadDeferrer deferrer; 190 ScopedPageLoadDeferrer deferrer;
190 191
191 printDelegate(frame); 192 printDelegate(frame);
192 } 193 }
193 194
194 } // namespace blink 195 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698