Commit 49308e28 authored by mmenke@chromium.org's avatar mmenke@chromium.org

Fix prerender history having FINAL_STATUS_MAX as the

cancellation reason, due to my change in r95721.

BUG=91799
TEST=Coming soon (As a net-internals test).

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96274 0039d316-1c4b-4281-b951-d872f2087c98
parent d86ff07e
......@@ -503,9 +503,6 @@ void PrerenderContents::Destroy(FinalStatus final_status) {
if (prerendering_has_been_cancelled_)
return;
prerendering_has_been_cancelled_ = true;
prerender_manager_->MoveEntryToPendingDelete(this);
if (child_id_ != -1 && route_id_ != -1) {
// Cancel the prerender in the PrerenderTracker. This is needed
// because destroy may be called directly from the UI thread without calling
......@@ -524,6 +521,11 @@ void PrerenderContents::Destroy(FinalStatus final_status) {
}
set_final_status(final_status);
prerendering_has_been_cancelled_ = true;
// This has to be done after setting the final status, as it adds the
// prerender to the history.
prerender_manager_->MoveEntryToPendingDelete(this);
// We may destroy the PrerenderContents before we have initialized the
// RenderViewHost. Otherwise set the Observer's PrerenderContents to NULL to
// avoid any more messages being sent.
......
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