fix RestoreForeignSessionTab in android
This commit is contained in:
parent
5da292bc15
commit
bc58f108fc
1 changed files with 29 additions and 0 deletions
29
build/patches/fix-bug-681.patch
Normal file
29
build/patches/fix-bug-681.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 23 Aug 2020 09:34:21 +0000
|
||||
Subject: bug 681
|
||||
|
||||
---
|
||||
chrome/browser/sessions/session_restore_android.cc | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
mode change 100644 => 100755 chrome/browser/sessions/session_restore_android.cc
|
||||
|
||||
diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser/sessions/session_restore_android.cc
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 3ea43e77a973849c9fd7a196d07c13415f3d615d..487c4b1c6544601830dc61f0d74872a9ac5b95e3
|
||||
--- a/chrome/browser/sessions/session_restore_android.cc
|
||||
+++ b/chrome/browser/sessions/session_restore_android.cc
|
||||
@@ -43,7 +43,12 @@ content::WebContents* SessionRestore::RestoreForeignSessionTab(
|
||||
TabAndroid* current_tab = TabAndroid::FromWebContents(web_contents);
|
||||
DCHECK(current_tab);
|
||||
if (disposition == WindowOpenDisposition::CURRENT_TAB) {
|
||||
- current_tab->SwapWebContents(std::move(new_web_contents), false, false);
|
||||
+ // START: bromite #681
|
||||
+ //current_tab->SwapWebContents(std::move(new_web_contents), false, false);
|
||||
+ int active_tab_index = tab_model->GetActiveIndex();
|
||||
+ tab_model->CreateTab(current_tab, new_web_contents.release());
|
||||
+ tab_model->CloseTabAt(active_tab_index);
|
||||
+ // END: bromite #681
|
||||
} else {
|
||||
DCHECK(disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB ||
|
||||
disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB);
|
Loading…
Add table
Reference in a new issue