Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1586)

Unified Diff: webkit/glue/plugins/plugin_string_stream.cc

Issue 393017: This CL fixes the document-open.html and window-open.html plugin layout tests... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/plugin_stream_url.cc ('k') | webkit/tools/npapi_layout_test_plugin/PluginObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_string_stream.cc
===================================================================
--- webkit/glue/plugins/plugin_string_stream.cc (revision 31913)
+++ webkit/glue/plugins/plugin_string_stream.cc (working copy)
@@ -21,6 +21,10 @@
void PluginStringStream::SendToPlugin(const std::string &data,
const std::string &mime_type) {
+ // Protect the stream against it being destroyed or the whole plugin instance
+ // being destroyed within the plugin stream callbacks.
+ scoped_refptr<PluginStringStream> protect(this);
+
int length = static_cast<int>(data.length());
if (Open(mime_type, std::string(), length, 0, false)) {
// TODO - check if it was not fully sent, and figure out a backup plan.
« no previous file with comments | « webkit/glue/plugins/plugin_stream_url.cc ('k') | webkit/tools/npapi_layout_test_plugin/PluginObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698