Commit e5455411 authored by Nate Chapin's avatar Nate Chapin Committed by Commit Bot

Ensure error page navigations don't get called back/foward without a HistoryItem

Bug: 784451
Change-Id: I62f97469bc9cf4c1aad0cc9ed5695b8a20012e18
Reviewed-on: https://chromium-review.googlesource.com/888262Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532674}
parent 5fa556bd
...@@ -2079,7 +2079,8 @@ void WebLocalFrameImpl::LoadData(const WebData& data, ...@@ -2079,7 +2079,8 @@ void WebLocalFrameImpl::LoadData(const WebData& data,
// When replacing a failed back/forward provisional navigation with an error // When replacing a failed back/forward provisional navigation with an error
// page, retain the HistoryItem for the failed provisional navigation // page, retain the HistoryItem for the failed provisional navigation
// and reuse it for the error page navigation. // and reuse it for the error page navigation.
if (provisional_document_loader->LoadType() == kFrameLoadTypeBackForward) { if (provisional_document_loader->LoadType() == kFrameLoadTypeBackForward &&
provisional_document_loader->GetHistoryItem()) {
history_item = provisional_document_loader->GetHistoryItem(); history_item = provisional_document_loader->GetHistoryItem();
web_frame_load_type = WebFrameLoadType::kBackForward; web_frame_load_type = WebFrameLoadType::kBackForward;
} }
......
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