Fix set parent race condition
Alter the openTab method to make sure that the parent is
always set before trying to load a url. This is done because
some web settings (useragent) are now inherited from the parent,
and we need to make sure those are applied before the UA is sent
to the server.
Change-Id: Ib33b75ac4648e8ba1ede9bb92406ea175aabb19d
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 8962475..4097334 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -855,11 +855,7 @@
transport.setWebView(mSubView);
} else {
final Tab newTab = mWebViewController.openTab(null,
- Tab.this.isPrivateBrowsingEnabled(),
- true, true);
- if (newTab != Tab.this) {
- Tab.this.addChildTab(newTab);
- }
+ Tab.this, true, true);
transport.setWebView(newTab.getWebView());
}
msg.sendToTarget();