OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/plugin_channel_host.h" | 5 #include "content/renderer/plugin_channel_host.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "content/common/child_process.h" | 9 #include "content/common/child_process.h" |
10 #include "content/common/npobject_base.h" | 10 #include "content/common/npobject_base.h" |
11 #include "content/common/plugin_messages.h" | 11 #include "content/common/plugin_messages.h" |
12 | 12 |
13 #if defined(OS_POSIX) | 13 #if defined(OS_POSIX) |
14 #include "ipc/ipc_channel_posix.h" | 14 #include "ipc/ipc_channel_posix.h" |
15 #endif | 15 #endif |
16 | 16 |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
18 | 18 |
| 19 namespace content { |
| 20 |
19 // TODO(shess): Debugging for http://crbug.com/97285 | 21 // TODO(shess): Debugging for http://crbug.com/97285 |
20 // | 22 // |
21 // The hypothesis at #55 requires that RemoveRoute() be called between | 23 // The hypothesis at #55 requires that RemoveRoute() be called between |
22 // sending ViewHostMsg_OpenChannelToPlugin to the browser, and calling | 24 // sending ViewHostMsg_OpenChannelToPlugin to the browser, and calling |
23 // GetPluginChannelHost() on the result. This code detects that case | 25 // GetPluginChannelHost() on the result. This code detects that case |
24 // and stores the backtrace of the RemoveRoute() in a breakpad key. | 26 // and stores the backtrace of the RemoveRoute() in a breakpad key. |
25 // The specific RemoveRoute() is not tracked (there could be multiple, | 27 // The specific RemoveRoute() is not tracked (there could be multiple, |
26 // and which is the one can't be known until the open completes), but | 28 // and which is the one can't be known until the open completes), but |
27 // the backtrace from any such nested call should be sufficient to | 29 // the backtrace from any such nested call should be sufficient to |
28 // drive a repro. | 30 // drive a repro. |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 221 |
220 NPChannelBase::OnChannelError(); | 222 NPChannelBase::OnChannelError(); |
221 | 223 |
222 for (ProxyMap::iterator iter = proxies_.begin(); | 224 for (ProxyMap::iterator iter = proxies_.begin(); |
223 iter != proxies_.end(); iter++) { | 225 iter != proxies_.end(); iter++) { |
224 iter->second->OnChannelError(); | 226 iter->second->OnChannelError(); |
225 } | 227 } |
226 | 228 |
227 proxies_.clear(); | 229 proxies_.clear(); |
228 } | 230 } |
| 231 |
| 232 } // namespace content |
OLD | NEW |