Commit c9952f7e authored by cbentzel@chromium.org's avatar cbentzel@chromium.org

Fix crash when swapping in a prerendered page for a page which has an unload handler.

***
Note: this is the fix without a browser test, for expediency. A CL with the test is in http://codereview.chromium.org/7046053/
***

The root cause PrerenderManager::OnCloseTabContentsDeleter was never unregistering itself as a TabContentsDelegate in CloseContents. 

r87606 exposed this by changing the TabContents destructor to deference the delegate if it's non-NULL. 

BUG=85350
TEST=None

Review URL: http://codereview.chromium.org/7108032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88478 0039d316-1c4b-4281-b951-d872f2087c98
parent aeb10cb1
...@@ -80,6 +80,7 @@ class PrerenderManager::OnCloseTabContentsDeleter : public TabContentsDelegate { ...@@ -80,6 +80,7 @@ class PrerenderManager::OnCloseTabContentsDeleter : public TabContentsDelegate {
} }
virtual void CloseContents(TabContents* source) OVERRIDE { virtual void CloseContents(TabContents* source) OVERRIDE {
tab_->tab_contents()->set_delegate(NULL);
manager_->ScheduleDeleteOldTabContents(tab_.release(), this); manager_->ScheduleDeleteOldTabContents(tab_.release(), this);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment