diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-07 04:35:38 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-07 04:35:38 +0000 |
commit | 5b1dec8c316dad02e4b781e7f22623cfee5f6553 (patch) | |
tree | c4f5457c1c7bd7e4a82dc64d8025ed9e7e9d1f70 | |
parent | 14c1b582e5ff7091f6a8d95c5578bea346c21dd9 (diff) | |
download | chromium_src-5b1dec8c316dad02e4b781e7f22623cfee5f6553.zip chromium_src-5b1dec8c316dad02e4b781e7f22623cfee5f6553.tar.gz chromium_src-5b1dec8c316dad02e4b781e7f22623cfee5f6553.tar.bz2 |
Early-return in RenderViewImpl::DidFlushPaint() if there is no WebView.
CL 9328016 exposed a bug with seemingly-unused stats code assuming that the RenderView's WebView must be valid when DidFlushPaint() is called, which may not be true if RenderWidget::OnSwapBuffersComplete is notified while the widget is closing down.
We'll follow up by verifying the stats code is unnecessary and removing it (see bug 112942).
BUG=112921,111639,112942
Review URL: http://codereview.chromium.org/9349004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120715 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/renderer/render_view_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 2489449..71cbefe 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -4348,6 +4348,11 @@ void RenderViewImpl::DidFlushPaint() { // won't change out from under us. pepper_delegate_.ViewFlushedPaint(); + // If the RenderWidget is closing down then early-exit, otherwise we'll crash. + // See crbug.com/112921. + if (!webview()) + return; + WebFrame* main_frame = webview()->mainFrame(); // If we have a provisional frame we are between the start and commit stages |