diff options
author | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 07:32:26 +0000 |
---|---|---|
committer | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 07:32:26 +0000 |
commit | c8019e398fcee63eb95f2ed0873aca9475744799 (patch) | |
tree | 998d1a70f9cea054821ae1e520d8b777d8b2bed1 /webkit | |
parent | 64f969cc85a57a0596a8281aa32a9c1560f9e220 (diff) | |
download | chromium_src-c8019e398fcee63eb95f2ed0873aca9475744799.zip chromium_src-c8019e398fcee63eb95f2ed0873aca9475744799.tar.gz chromium_src-c8019e398fcee63eb95f2ed0873aca9475744799.tar.bz2 |
Guard against NULL webview in dispatchDidFinishDocumentLoad. The
webview can be NULL if dispatchDidFinishDocumentLoad is called via a
frame destructor.
BUG=20324
TEST=LayoutTests/http/tests/security/javascriptURL/javascriptURL-in-new-iframe.html
Review URL: http://codereview.chromium.org/194022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webframeloaderclient_impl.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc index 760d59a..5fdaf9e 100644 --- a/webkit/glue/webframeloaderclient_impl.cc +++ b/webkit/glue/webframeloaderclient_impl.cc @@ -320,7 +320,6 @@ void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() { WebViewImpl* webview = webframe_->GetWebViewImpl(); - WebViewDelegate* d = webview->delegate(); DocumentLoader* documentLoader = webframe_->frame()->loader()->activeDocumentLoader(); WebDataSourceImpl* data_source = @@ -330,8 +329,8 @@ void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() { // listeners and their associated HTMLInputElements. webframe_->ClearPasswordListeners(); - if (d) - d->DidFinishDocumentLoadForFrame(webview, webframe_); + if (webview && webview->delegate()) + webview->delegate()->DidFinishDocumentLoadForFrame(webview, webframe_); } bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache( |