Bug 1530861 - Acknowledged newSource events sent by remote devices on FF66 and less. r=jdescottes
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 28 Feb 2019 08:25:36 +0000
changeset 519578 9a25f61c3ca39ba331fcf9810a6464fd14c78414
parent 519481 1977f2af54696eef4969cced14f9497727207526
child 519579 74ce5e253d22d38226b466ac175fc805acba8c4b
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)
reviewersjdescottes
bugs1530861
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 1530861 - Acknowledged newSource events sent by remote devices on FF66 and less. r=jdescottes newSource events used to be sent on the target actors on FF66 and before, this is no longer the case. But we still have to accept them if we connect to old remotes, otherwise the events are considered as a method reply and confuses packet ordering. Differential Revision: https://phabricator.services.mozilla.com/D21394
devtools/shared/specs/targets/addon.js
devtools/shared/specs/targets/browsing-context.js
devtools/shared/specs/targets/content-process.js
devtools/shared/specs/targets/worker.js
--- a/devtools/shared/specs/targets/addon.js
+++ b/devtools/shared/specs/targets/addon.js
@@ -25,11 +25,22 @@ const addonTargetSpec = generateActorSpe
       request: {},
       response: {},
     },
     push: {
       request: {},
       response: RetVal("json"),
     },
   },
+
+  events: {
+    // The thread actor is no longer emitting newSource event in the name of the target
+    // actor (bug 1269919), but as we may still connect to older servers which still do,
+    // we have to keep it being mentioned here. Otherwise the event is considered as a
+    // response to a request and confuses the packet ordering.
+    // We can remove that once FF57 is no longer supported.
+    newSource: {
+      type: "newSource",
+    },
+  },
 });
 
 exports.addonTargetSpec = addonTargetSpec;
--- a/devtools/shared/specs/targets/browsing-context.js
+++ b/devtools/shared/specs/targets/browsing-context.js
@@ -131,15 +131,24 @@ const browsingContextTargetSpecPrototype
       type: "tabDetached",
       // This is to make browser_dbg_navigation.js to work as it expect to
       // see a packet object when listening for tabDetached
       from: Option(0, "string"),
     },
     workerListChanged: {
       type: "workerListChanged",
     },
+
+    // The thread actor is no longer emitting newSource event in the name of the target
+    // actor (bug 1269919), but as we may still connect to older servers which still do,
+    // we have to keep it being mentioned here. Otherwise the event is considered as a
+    // response to a request and confuses the packet ordering.
+    // We can remove that once FF57 is no longer supported.
+    newSource: {
+      type: "newSource",
+    },
   },
 };
 
 const browsingContextTargetSpec = generateActorSpec(browsingContextTargetSpecPrototype);
 
 exports.browsingContextTargetSpecPrototype = browsingContextTargetSpecPrototype;
 exports.browsingContextTargetSpec = browsingContextTargetSpec;
--- a/devtools/shared/specs/targets/content-process.js
+++ b/devtools/shared/specs/targets/content-process.js
@@ -19,12 +19,21 @@ const contentProcessTargetSpec = generat
       response: RetVal("contentProcessTarget.workers"),
     },
   },
 
   events: {
     workerListChanged: {
       type: "workerListChanged",
     },
+
+    // The thread actor is no longer emitting newSource event in the name of the target
+    // actor (bug 1269919), but as we may still connect to older servers which still do,
+    // we have to keep it being mentioned here. Otherwise the event is considered as a
+    // response to a request and confuses the packet ordering.
+    // We can remove that once FF57 is no longer supported.
+    newSource: {
+      type: "newSource",
+    },
   },
 });
 
 exports.contentProcessTargetSpec = contentProcessTargetSpec;
--- a/devtools/shared/specs/targets/worker.js
+++ b/devtools/shared/specs/targets/worker.js
@@ -31,12 +31,21 @@ const workerTargetSpec = generateActorSp
 
   events: {
     // WorkerTargetActor still uses old sendActorEvent function,
     // but it should use emit instead.
     // Do not emit a `close` event as Target class emit this event on destroy
     "worker-close": {
       type: "close",
     },
+
+    // The thread actor is no longer emitting newSource event in the name of the target
+    // actor (bug 1269919), but as we may still connect to older servers which still do,
+    // we have to keep it being mentioned here. Otherwise the event is considered as a
+    // response to a request and confuses the packet ordering.
+    // We can remove that once FF57 is no longer supported.
+    newSource: {
+      type: "newSource",
+    },
   },
 });
 
 exports.workerTargetSpec = workerTargetSpec;