diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 05:51:23 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 05:51:23 +0000 |
commit | 144675cbfd7a7dffb8f67ea600cf8603d72b9fea (patch) | |
tree | ed5d65c3da285ef26911a121947743f703cf005d /webkit | |
parent | 36336ee3bf3668fc8c9c536a9e5caa0e462ffca4 (diff) | |
download | chromium_src-144675cbfd7a7dffb8f67ea600cf8603d72b9fea.zip chromium_src-144675cbfd7a7dffb8f67ea600cf8603d72b9fea.tar.gz chromium_src-144675cbfd7a7dffb8f67ea600cf8603d72b9fea.tar.bz2 |
Don't call NPP_StreamAsFile on the plugin, if the stream is being closed due to an error, i.e. due to a user break or a network error. This causes the FoxIt reader plugin to crash.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=9539
Bug=9539
Review URL: http://codereview.chromium.org/56206
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_stream.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webkit/glue/plugins/plugin_stream.cc b/webkit/glue/plugins/plugin_stream.cc index 7d7d701..fc61d19 100644 --- a/webkit/glue/plugins/plugin_stream.cc +++ b/webkit/glue/plugins/plugin_stream.cc @@ -228,7 +228,8 @@ bool PluginStream::Close(NPReason reason) { // Also, allow the plugin to access it now. if (TempFileIsValid()) { CloseTempFile(); - WriteAsFile(); + if (reason == NPRES_DONE) + WriteAsFile(); } if (stream_.ndata != NULL) { |