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

Unified Diff: chrome/plugin/plugin_channel_base.cc

Issue 506072: Don't push scoped refptr's onto the stack in plugin_channel_base. (Closed)
Patch Set: Created 11 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/plugin_channel_base.cc
diff --git a/chrome/plugin/plugin_channel_base.cc b/chrome/plugin/plugin_channel_base.cc
index 026b9e5db9301631849c5c7266ea87a568710703..91cacfc08e76362fce635ade6f7a5430f4b05e44 100644
--- a/chrome/plugin/plugin_channel_base.cc
+++ b/chrome/plugin/plugin_channel_base.cc
@@ -21,7 +21,7 @@ typedef base::hash_map<std::string, scoped_refptr<PluginChannelBase> >
static PluginChannelMap g_plugin_channels_;
-static base::LazyInstance<std::stack<scoped_refptr<PluginChannelBase> > >
+static base::LazyInstance<std::stack<PluginChannelBase*> >
lazy_plugin_channel_stack_(base::LINKER_INITIALIZED);
PluginChannelBase* PluginChannelBase::GetChannel(
@@ -125,8 +125,8 @@ int PluginChannelBase::Count() {
void PluginChannelBase::OnMessageReceived(const IPC::Message& message) {
// This call might cause us to be deleted, so keep an extra reference to
// ourself so that we can send the reply and decrement back in_dispatch_.
- lazy_plugin_channel_stack_.Pointer()->push(
- scoped_refptr<PluginChannelBase>(this));
+ scoped_refptr<PluginChannelBase> me(this);
+ lazy_plugin_channel_stack_.Pointer()->push(this);
if (message.is_sync())
in_sync_dispatch_++;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698