| Index: chrome/browser/tab_contents/site_instance.cc
|
| ===================================================================
|
| --- chrome/browser/tab_contents/site_instance.cc (revision 15565)
|
| +++ chrome/browser/tab_contents/site_instance.cc (working copy)
|
| @@ -96,7 +96,10 @@
|
| /*static*/
|
| SiteInstance* SiteInstance::CreateSiteInstanceForURL(Profile* profile,
|
| const GURL& url) {
|
| - return (new BrowsingInstance(profile))->GetSiteInstanceForURL(url);
|
| + // This BrowsingInstance may be deleted if it returns an existing
|
| + // SiteInstance.
|
| + scoped_refptr<BrowsingInstance> instance(new BrowsingInstance(profile));
|
| + return instance->GetSiteInstanceForURL(url);
|
| }
|
|
|
| /*static*/
|
|
|