diff options
author | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 23:30:59 +0000 |
---|---|---|
committer | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 23:30:59 +0000 |
commit | 857887e8348c9b88df2d6aaf8895d1ed15b1d6ce (patch) | |
tree | 80320c6d742ad1922ab84a28921ddee2b1d629b3 /webkit/glue | |
parent | fbb700c3b97898a128e30d503d80ff07202bc244 (diff) | |
download | chromium_src-857887e8348c9b88df2d6aaf8895d1ed15b1d6ce.zip chromium_src-857887e8348c9b88df2d6aaf8895d1ed15b1d6ce.tar.gz chromium_src-857887e8348c9b88df2d6aaf8895d1ed15b1d6ce.tar.bz2 |
Do not touch a NPStream object when it is already destructed.
BUG=20651
TEST=Run "sh tools/valgrind/valgrind_webkit_tests.sh --debug LayoutTests/plugins/destroy-stream-twice.html" and verify that the "Invalid read of size 4" error at NPP_DestroyStream() is not reported in the log (vlayout-NNNNN.log).
Review URL: http://codereview.chromium.org/354005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/plugin_instance.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/webkit/glue/plugins/plugin_instance.cc b/webkit/glue/plugins/plugin_instance.cc index 458d287..27526f1 100644 --- a/webkit/glue/plugins/plugin_instance.cc +++ b/webkit/glue/plugins/plugin_instance.cc @@ -207,8 +207,7 @@ NPError PluginInstance::NPP_DestroyStream(NPStream *stream, NPReason reason) { DCHECK(npp_functions_ != 0); DCHECK(npp_functions_->destroystream != 0); - if (stream == NULL || (stream->ndata == NULL) || - !IsValidStream(stream)) + if (stream == NULL || !IsValidStream(stream) || (stream->ndata == NULL)) return NPERR_INVALID_INSTANCE_ERROR; if (npp_functions_->destroystream != 0) { |