diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 20:46:37 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 20:46:37 +0000 |
commit | 03f882aa62d925a6f27e9038f4f7235be55afe02 (patch) | |
tree | 4f06e41eb249f8f9f335f292c35f27822221f636 /chrome/renderer/webplugin_delegate_pepper.cc | |
parent | de049e2d0eab6145c2805de17ff838f58c14fdd3 (diff) | |
download | chromium_src-03f882aa62d925a6f27e9038f4f7235be55afe02.zip chromium_src-03f882aa62d925a6f27e9038f4f7235be55afe02.tar.gz chromium_src-03f882aa62d925a6f27e9038f4f7235be55afe02.tar.bz2 |
Fixed some bugs that prevented the GPU plugin from shutting down without crashing.
TEST=trybots
BUG=none
Review URL: http://codereview.chromium.org/529004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_pepper.cc')
-rw-r--r-- | chrome/renderer/webplugin_delegate_pepper.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc index 4c32b7b..0686a56 100644 --- a/chrome/renderer/webplugin_delegate_pepper.cc +++ b/chrome/renderer/webplugin_delegate_pepper.cc @@ -129,6 +129,15 @@ void WebPluginDelegatePepper::DestroyInstance() { instance_ = 0; } + + // Destroy the nested GPU plugin only after first destroying the underlying + // Pepper plugin. This is so the Pepper plugin does not attempt to issue + // rendering commands after the GPU plugin has stopped processing them and + // responding to them. + if (nested_delegate_) { + nested_delegate_->PluginDestroyed(); + nested_delegate_ = NULL; + } } void WebPluginDelegatePepper::UpdateGeometry( @@ -579,10 +588,6 @@ WebPluginDelegatePepper::~WebPluginDelegatePepper() { } void WebPluginDelegatePepper::PluginDestroyed() { - if (nested_delegate_) { - nested_delegate_->PluginDestroyed(); - nested_delegate_ = NULL; - } delete this; } |