Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3953)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java

Issue 1731673002: Add tab reparenting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove test Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
index 70d93139a47a47caf27c7e313cf6bb0413c11570..f23bfb5535da518910e56d5da8511110f1bc3596 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
@@ -677,7 +677,10 @@ public class ChromeLauncherActivity extends Activity
// re-delivered when a Chrome Activity is restarted.
boolean isWebContentsPending = false;
int tabId = ActivityDelegate.getTabIdFromIntent(intent);
- AsyncTabParamsManager.add(tabId, asyncParams);
+ if (!AsyncTabParamsManager.hasParamsForTabId(tabId)) {
+ AsyncTabParamsManager.add(tabId, asyncParams);
+ }
+
isWebContentsPending = asyncParams.getWebContents() != null;
Bundle options = null;
@@ -700,7 +703,7 @@ public class ChromeLauncherActivity extends Activity
if (exception.getCause() instanceof TransactionTooLargeException) {
Log.e(TAG, "Failed to launch DocumentActivity because Intent was too large");
AsyncTabParamsManager.remove(tabId);
- if (isWebContentsPending) asyncParams.getWebContents().destroy();
+ asyncParams.destroy();
return false;
}
throw exception;

Powered by Google App Engine
This is Rietveld 408576698