Fix using invalid pointer as SiteInstance

This commit is contained in:
Cheng Zhao 2016-05-23 12:46:14 +09:00
parent a2bd55dd3c
commit 899cdb48d7
2 changed files with 4 additions and 3 deletions

View file

@ -129,8 +129,9 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
if (url.SchemeIs(url::kJavaScriptScheme))
return;
*new_instance =
content::SiteInstance::CreateForURL(browser_context, url).get();
scoped_refptr<content::SiteInstance> site_instance =
content::SiteInstance::CreateForURL(browser_context, url);
*new_instance = site_instance.get();
// Remember the original renderer process of the pending renderer process.
auto current_process = current_instance->GetProcess();