Bug 1533467 - Rename the browser.fission.simulate pref. r=mconley
authorFelipe Gomes <felipc@gmail.com>
Thu, 07 Mar 2019 21:00:11 +0000
changeset 520902 7bc5e1d2789611b17adcdb4483bc1aea9199a26b
parent 520901 9b8ef8d817750751af255a622bcf208a7db1c3b2
child 520903 e908fbc7b9302f680b0bc3924d49c0f027739c9d
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1533467
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533467 - Rename the browser.fission.simulate pref. r=mconley This renames the pref to the pattern chosen for all of the Fission work, and also breaks down the pref into two separate ones to have a more fine-grained control of the simulation. Differential Revision: https://phabricator.services.mozilla.com/D22579
browser/app/profile/firefox.js
toolkit/modules/ActorManagerChild.jsm
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1804,17 +1804,20 @@ pref("intl.multilingual.enabled", false)
 pref("intl.multilingual.downloadEnabled", false);
 #endif
 
 // Simulate conditions that will happen when the browser
 // is running with Fission enabled. This is meant to assist
 // development and testing of Fission.
 // The current simulated conditions are:
 // - Don't propagate events from subframes to JS child actors
-pref("browser.fission.simulate", false);
+pref("fission.frontend.simulate-events", false);
+// - Only deliver subframe messages that specifies
+//   their destination (using the BrowsingContext id).
+pref("fission.frontend.simulate-messages", false);
 
 // Prio preferences
 // Only enable by default on Nightly.
 // On platforms that do not build libprio, do not set these prefs at all, which gives us a way to detect support.
 
 // Curve25519 public keys for Prio servers
 pref("prio.publicKeyA", "35AC1C7576C7C6EDD7FED6BCFC337B34D48CB4EE45C86BEEFB40BD8875707733");
 pref("prio.publicKeyB", "26E6674E65425B823F1F1D5F96E3BB3EF9E406EC7FBA7DEF8B08A35DD135AF50");
--- a/toolkit/modules/ActorManagerChild.jsm
+++ b/toolkit/modules/ActorManagerChild.jsm
@@ -18,18 +18,21 @@ const {XPCOMUtils} = ChromeUtils.import(
 
 ChromeUtils.defineModuleGetter(this, "WebNavigationFrames",
                                "resource://gre/modules/WebNavigationFrames.jsm");
 
 const {DefaultMap} = ExtensionUtils;
 
 const {sharedData} = Services.cpmm;
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "simulateFission",
-                                      "browser.fission.simulate", false);
+XPCOMUtils.defineLazyPreferenceGetter(this, "simulateEvents",
+                                      "fission.frontend.simulate-events", false);
+XPCOMUtils.defineLazyPreferenceGetter(this, "simulateMessages",
+                                      "fission.frontend.simulate-messages", false);
+
 
 function getMessageManager(window) {
   return window.docShell.messageManager;
 }
 
 class Dispatcher {
   constructor(mm, data) {
     this.mm = mm;
@@ -120,31 +123,31 @@ class Dispatcher {
     if (event.type == "unload") {
       this.cleanup();
     }
   }
 
   handleActorEvent(actor, event) {
     let targetWindow = null;
 
-    if (simulateFission) {
+    if (simulateEvents) {
       targetWindow = event.target.ownerGlobal;
       if (targetWindow != this.window) {
         // events can't propagate across frame boundaries because the
         // frames will be hosted on separated processes.
         return;
       }
     }
     this.getActor(actor).handleEvent(event);
   }
 
   receiveMessage(message) {
     let actors = this.messages.get(message.name);
 
-    if (simulateFission) {
+    if (simulateMessages) {
       let match = false;
       let data = message.data || {};
       if (data.hasOwnProperty("frameId")) {
         match = (data.frameId == this.frameId);
       } else if (data.hasOwnProperty("browsingContextId")) {
         match = (data.browsingContextId == this.browsingContextId);
       } else {
         // if no specific target was given, just dispatch it to