| Index: chrome/browser/extensions/api/processes/processes_api.cc
|
| diff --git a/chrome/browser/extensions/api/processes/processes_api.cc b/chrome/browser/extensions/api/processes/processes_api.cc
|
| index adcd39d35906070441286cecf4ca5d82dfd705dc..309203e7a2be73afda26179d34521e4b95c7f14b 100644
|
| --- a/chrome/browser/extensions/api/processes/processes_api.cc
|
| +++ b/chrome/browser/extensions/api/processes/processes_api.cc
|
| @@ -112,12 +112,15 @@ ListValue* GetTabsForProcess(int process_id) {
|
| int tab_id = -1;
|
| // We need to loop through all the RVHs to ensure we collect the set of all
|
| // tabs using this renderer process.
|
| - content::RenderProcessHost::RenderWidgetHostsIterator iter(
|
| - rph->GetRenderWidgetHostsIterator());
|
| - for (; !iter.IsAtEnd(); iter.Advance()) {
|
| - const content::RenderWidgetHost* widget = iter.GetCurrentValue();
|
| - DCHECK(widget);
|
| - if (!widget || !widget->IsRenderView())
|
| + scoped_ptr<content::RenderWidgetHost::List> hosts =
|
| + content::RenderWidgetHost::GetRenderWidgetHosts();
|
| + for (content::RenderWidgetHost::List::const_iterator it = hosts->begin();
|
| + it != hosts->end();
|
| + ++it) {
|
| + const content::RenderWidgetHost* widget = *it;
|
| + if (widget->GetProcess()->GetID() != process_id)
|
| + continue;
|
| + if (!widget->IsRenderView())
|
| continue;
|
|
|
| content::RenderViewHost* host = content::RenderViewHost::From(
|
|
|