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

Side by Side Diff: chrome/plugin/plugin_channel_base.cc

Issue 119052: Fix browser hang due to plugin deadlock... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/plugin/plugin_channel_base.h" 5 #include "chrome/plugin/plugin_channel_base.h"
6 6
7 #include "base/hash_tables.h" 7 #include "base/hash_tables.h"
8 #include "chrome/common/child_process.h" 8 #include "chrome/common/child_process.h"
9 #include "chrome/common/ipc_sync_message.h" 9 #include "chrome/common/ipc_sync_message.h"
10 10
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 return channel; 42 return channel;
43 } 43 }
44 44
45 PluginChannelBase::PluginChannelBase() 45 PluginChannelBase::PluginChannelBase()
46 : plugin_count_(0), 46 : plugin_count_(0),
47 peer_pid_(0), 47 peer_pid_(0),
48 in_remove_route_(false), 48 in_remove_route_(false),
49 channel_valid_(false), 49 channel_valid_(false),
50 in_dispatch_(0),
51 send_unblocking_only_during_dispatch_(false) { 50 send_unblocking_only_during_dispatch_(false) {
52 } 51 }
53 52
54 PluginChannelBase::~PluginChannelBase() { 53 PluginChannelBase::~PluginChannelBase() {
55 } 54 }
56 55
56 int PluginChannelBase::in_dispatch_ = 0;
57
57 void PluginChannelBase::CleanupChannels() { 58 void PluginChannelBase::CleanupChannels() {
58 // Make a copy of the references as we can't iterate the map since items will 59 // Make a copy of the references as we can't iterate the map since items will
59 // be removed from it as we clean them up. 60 // be removed from it as we clean them up.
60 std::vector<scoped_refptr<PluginChannelBase> > channels; 61 std::vector<scoped_refptr<PluginChannelBase> > channels;
61 for (PluginChannelMap::const_iterator iter = g_plugin_channels_.begin(); 62 for (PluginChannelMap::const_iterator iter = g_plugin_channels_.begin();
62 iter != g_plugin_channels_.end(); 63 iter != g_plugin_channels_.end();
63 ++iter) { 64 ++iter) {
64 channels.push_back(iter->second); 65 channels.push_back(iter->second);
65 } 66 }
66 67
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 "should override in subclass if you care about control messages"; 184 "should override in subclass if you care about control messages";
184 } 185 }
185 186
186 void PluginChannelBase::OnChannelError() { 187 void PluginChannelBase::OnChannelError() {
187 channel_valid_ = false; 188 channel_valid_ = false;
188 } 189 }
189 190
190 void PluginChannelBase::SendUnblockingOnlyDuringDispatch() { 191 void PluginChannelBase::SendUnblockingOnlyDuringDispatch() {
191 send_unblocking_only_during_dispatch_ = true; 192 send_unblocking_only_during_dispatch_ = true;
192 } 193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698