| Index: content/browser/frame_host/navigation_request.cc
|
| diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
|
| index 895d3891a6ca6662039bd1f7a5bf949729ed204b..a047b10686475e946f87bc5cd09d262fbb5026a3 100644
|
| --- a/content/browser/frame_host/navigation_request.cc
|
| +++ b/content/browser/frame_host/navigation_request.cc
|
| @@ -381,13 +381,24 @@ void NavigationRequest::BeginNavigation() {
|
| }
|
|
|
| void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) {
|
| + DCHECK_EQ(frame_tree_node_->navigation_request(), this);
|
| // TODO(nasko): Update the NavigationHandle creation to ensure that the
|
| // proper values are specified for is_same_page.
|
| - navigation_handle_ = NavigationHandleImpl::Create(
|
| - common_params_.url, frame_tree_node_, !browser_initiated_,
|
| - false, // is_same_page
|
| - common_params_.navigation_start, pending_nav_entry_id,
|
| - false); // started_in_context_menu
|
| + FrameTreeNode* frame_tree_node = frame_tree_node_;
|
| + std::unique_ptr<NavigationHandleImpl> navigation_handle =
|
| + NavigationHandleImpl::Create(
|
| + common_params_.url, frame_tree_node_, !browser_initiated_,
|
| + false, // is_same_page
|
| + common_params_.navigation_start, pending_nav_entry_id,
|
| + false); // started_in_context_menu
|
| +
|
| + if (!frame_tree_node->navigation_request()) {
|
| + // A callback could have cancelled this request synchronously in which case
|
| + // |this| is deleted.
|
| + return;
|
| + }
|
| +
|
| + navigation_handle_ = std::move(navigation_handle);
|
|
|
| if (!begin_params_.searchable_form_url.is_empty()) {
|
| navigation_handle_->set_searchable_form_url(
|
|
|