| 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 a9c2314efe81b1ec63a27eeed6b3a28f3a458843..67298e50e9cc42b8202596de8d955afc2b42bfd7 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -335,7 +335,13 @@ class SiteProcessMap : public base::SupportsUserData::Data {
|
| SiteProcessMap() {}
|
|
|
| void RegisterProcess(const std::string& site, RenderProcessHost* process) {
|
| - map_[site] = process;
|
| + // There could already exist a site to process mapping due to races between
|
| + // two WebContents with blank SiteInstances. If that occurs, keeping the
|
| + // exising entry and not overwriting it is a predictable behavior that is
|
| + // safe.
|
| + SiteToProcessMap::iterator i = map_.find(site);
|
| + if (i == map_.end())
|
| + map_[site] = process;
|
| }
|
|
|
| RenderProcessHost* FindProcess(const std::string& site) {
|
|
|