Chromium Code Reviews| Index: content/browser/renderer_host/render_process_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
| index 2c48d780f0fd99df89d492dc61abe6e947cd9d78..631388e169c2878fa6a6475bf6a23525467571a1 100644 |
| --- a/content/browser/renderer_host/render_process_host_impl.cc |
| +++ b/content/browser/renderer_host/render_process_host_impl.cc |
| @@ -333,7 +333,9 @@ class SiteProcessMap : public base::SupportsUserData::Data { |
| SiteProcessMap() {} |
| void RegisterProcess(const std::string& site, RenderProcessHost* process) { |
| - map_[site] = process; |
| + SiteToProcessMap::iterator i = map_.find(site); |
|
Charlie Reis
2017/03/13 19:57:30
This should have a comment, since at first glance
nasko
2017/03/13 21:06:19
Comment added.
|
| + if (i == map_.end()) |
| + map_[site] = process; |
| } |
| RenderProcessHost* FindProcess(const std::string& site) { |