Commit 04ab2226 authored by Dana Fried's avatar Dana Fried Committed by Commit Bot

Fix hard-crash when opening background links from PWA windows.

See bug for full description.

Now if a tab wants to open another tab in the same group, but the other
tab would open in a different window, the group is not assigned. Calling
TabStripModel::InsertWebContentsAt() with params specifying a group that
does not exist at all in the tabstrip is (and should be) an invalid
operation.

Bug: 1011140
Change-Id: I34d9cf15ec74b96f9c5c53878f76f124fcca4d57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1839015
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Auto-Submit: Dana Fried <dfried@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703458}
parent 3ffd72fa
...@@ -2447,6 +2447,9 @@ void Browser::ConfigureTabGroupForNavigation(content::WebContents* source, ...@@ -2447,6 +2447,9 @@ void Browser::ConfigureTabGroupForNavigation(content::WebContents* source,
if (!source) if (!source)
return; return;
if (!SupportsWindowFeature(WindowFeature::FEATURE_TABSTRIP))
return;
const int source_index = tab_strip_model_->GetIndexOfWebContents(source); const int source_index = tab_strip_model_->GetIndexOfWebContents(source);
// If the source tab is pinned, don't create a group. // If the source tab is pinned, don't create a group.
......
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