Bug 1588203 - Change process for tab open in cpstartup r?mconley draft
authorDoug Thayer <dothayer@mozilla.com>
Sat, 26 Oct 2019 13:51:57 -0700
changeset 2424711 997f9fa84f8b22fb6d83fed96a745538a105b990
parent 2423667 afc2c9518d8893923ebe4cd9fcf7427cc4189673
child 2424712 98cd2361665b0c44f4022d99afa87e49e2138714
push id447524
push userdothayer@mozilla.com
push dateMon, 11 Nov 2019 06:19:50 +0000
treeherdertry@98cd2361665b [default view] [failures only]
reviewersmconley
bugs1588203
milestone72.0a1
Bug 1588203 - Change process for tab open in cpstartup r?mconley This will cause us to actually launch a new content process, which we were previously not doing. Differential Revision: https://phabricator.services.mozilla.com/D50708
testing/talos/talos/tests/cpstartup/extension/api.js
--- a/testing/talos/talos/tests/cpstartup/extension/api.js
+++ b/testing/talos/talos/tests/cpstartup/extension/api.js
@@ -23,16 +23,17 @@ ChromeUtils.defineModuleGetter(
 ChromeUtils.defineModuleGetter(
   this,
   "Services",
   "resource://gre/modules/Services.jsm"
 );
 
 const PREALLOCATED_PREF = "dom.ipc.processPrelaunch.enabled";
 const MESSAGES = ["CPStartup:Go", "Content:BrowserChildReady"];
+let domainID = 1;
 
 /* global ExtensionAPI */
 
 this.cpstartup = class extends ExtensionAPI {
   onStartup() {
     for (let msgName of MESSAGES) {
       Services.mm.addMessageListener(msgName, this);
     }
@@ -94,17 +95,21 @@ this.cpstartup = class extends Extension
       }
     }
   }
 
   async openTab(gBrowser, url) {
     // Start the timer and the profiler right before the tab open on the parent side.
     TalosParentProfiler.resume("tab opening starts");
     this.startStamp = Services.telemetry.msSystemNow();
-    this.tab = gBrowser.selectedTab = gBrowser.addTrustedTab(url);
+    let newDomainURL = url.replace(
+      /http:\/\/127\.0\.0\.1:[0-9]+/,
+      "http://domain_" + domainID++
+    );
+    this.tab = gBrowser.selectedTab = gBrowser.addTrustedTab(newDomainURL);
 
     let { tab, delta } = await this.whenTabReady();
     TalosParentProfiler.pause("tab opening end");
     await this.removeTab(tab);
     return delta;
   }
 
   whenTabReady() {