Fix a leak of the new location GURL by NotificationTask when doing a redirect.
The problem is scoped_ptr<ResourceRequestDetails> is used to delete an instance of ResourceRedirectDetails, however the base class's destructor is non-virtual, so ResourceRedirectDetails extra field (GURL new_url_) does not get torn down properly. Note that the blame callstacks in the bug report appear unrelated, because std::string is doing some fancy refcounting under the hood. So as GURLs get passed around, they take over the GURL::spec's memory that got allocated earlier by the network stack. BUG=http://crbug.com/10873 TEST=The "RedirectTest.*" ui tests when run on linux valgrind bots should show no leaks Review URL: http://codereview.chromium.org/155204 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20179 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment