File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
shell/browser/extensions/api/tabs Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -651,7 +651,16 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
651651 // will stay in the omnibox - see https://crbug.com/1085779.
652652 load_params.transition_type = ui::PAGE_TRANSITION_FROM_API;
653653
654- web_contents_->GetController ().LoadURLWithParams (load_params);
654+ base::WeakPtr<content::NavigationHandle> navigation_handle =
655+ web_contents_->GetController ().LoadURLWithParams (load_params);
656+ // Navigation can fail for any number of reasons at the content layer.
657+ // Unfortunately, we can't provide a detailed error message here, because
658+ // there are too many possible triggers. At least notify the extension that
659+ // the update failed.
660+ if (!navigation_handle) {
661+ *error = " Navigation rejected." ;
662+ return false ;
663+ }
655664
656665 DCHECK_EQ (url,
657666 web_contents_->GetController ().GetPendingEntry ()->GetVirtualURL ());
You can’t perform that action at this time.
0 commit comments