Backed out 2 changesets (bug 1454373) for mochitest devtools failures on devtools/client/shadereditor/test/browser_se_*. CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Tue, 17 Apr 2018 17:30:28 +0300
changeset 414046 3ee4cf8dc2ed4ae1b81d229398706e243f3c7c3f
parent 414045 d22104932e7b81357862408d7a93c58cf0943688
child 414047 ac148c181d2b0471fbe34b2559ad9876790f3796
push id33857
push userncsoregi@mozilla.com
push dateTue, 17 Apr 2018 21:54:38 +0000
treeherdermozilla-central@1a1223d74b7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1454373
milestone61.0a1
backs out4ec712f0aa130867806fa76a9fe275f37f307a6b
b2ada4fddfa05ef471e99aec6035e63519b6f10d
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
Backed out 2 changesets (bug 1454373) for mochitest devtools failures on devtools/client/shadereditor/test/browser_se_*. CLOSED TREE Backed out changeset 4ec712f0aa13 (bug 1454373) Backed out changeset b2ada4fddfa0 (bug 1454373)
devtools/server/tests/unit/test_protocol_stack.js
devtools/shared/defer.js
devtools/shared/protocol.js
--- a/devtools/server/tests/unit/test_protocol_stack.js
+++ b/devtools/server/tests/unit/test_protocol_stack.js
@@ -71,17 +71,17 @@ function run_test() {
 
   client.connect().then(function onConnect() {
     rootClient = RootFront(client);
 
     rootClient.simpleReturn().then(() => {
       let stack = Components.stack;
       while (stack) {
         info(stack.name);
-        if (stack.name.includes("run_test/onConnect")) {
+        if (stack.name == "onConnect") {
           // Reached back to outer function before request
           ok(true, "Complete stack");
           return;
         }
         stack = stack.asyncCaller || stack.caller;
       }
       ok(false, "Incomplete stack");
     }, () => {
--- a/devtools/shared/defer.js
+++ b/devtools/shared/defer.js
@@ -1,14 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
+// See bug 1273941 to understand this choice of promise.
+const Promise = require("promise");
+
 /**
  * Returns a deferred object, with a resolve and reject property.
  * https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred
  */
 module.exports = function defer() {
   let resolve, reject;
   let promise = new Promise(function() {
     resolve = arguments[0];
--- a/devtools/shared/protocol.js
+++ b/devtools/shared/protocol.js
@@ -1,14 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
+var promise = require("promise");
 var defer = require("devtools/shared/defer");
 const { extend } = require("devtools/shared/extend");
 var EventEmitter = require("devtools/shared/event-emitter");
 var {getStack, callFunctionWithAsyncStack} = require("devtools/shared/platform/stack");
 var {settleAll} = require("devtools/shared/DevToolsUtils");
 var {lazyLoadSpec, lazyLoadFront} = require("devtools/shared/specs/index");
 
 /**
@@ -977,17 +978,17 @@ Actor.prototype = extend(Pool.prototype,
     this.conn.send({
       from: this.actorID,
       error: error.error || "unknownError",
       message: error.message
     });
   },
 
   _queueResponse: function(create) {
-    let pending = this._pendingResponse || Promise.resolve(null);
+    let pending = this._pendingResponse || promise.resolve(null);
     let response = create(pending);
     this._pendingResponse = response;
   }
 });
 exports.Actor = Actor;
 
 /**
  * Tags a prtotype method as an actor method implementation.
@@ -1242,17 +1243,17 @@ Front.prototype = extend(Pool.prototype,
     return Pool.prototype.manage.call(this, front);
   },
 
   /**
    * @returns a promise that will resolve to the actorID this front
    * represents.
    */
   actor: function() {
-    return Promise.resolve(this.actorID);
+    return promise.resolve(this.actorID);
   },
 
   toString: function() {
     return "[Front for " + this.typeName + "/" + this.actorID + "]";
   },
 
   /**
    * Update the actor from its representation.
@@ -1308,17 +1309,17 @@ Front.prototype = extend(Pool.prototype,
         throw ex;
       }
       if (event.pre) {
         let results = event.pre.map(pre => pre.apply(this, args));
 
         // Check to see if any of the preEvents returned a promise -- if so,
         // wait for their resolution before emitting. Otherwise, emit synchronously.
         if (results.some(result => result && typeof result.then === "function")) {
-          Promise.all(results).then(() => {
+          promise.all(results).then(() => {
             return EventEmitter.emit.apply(null, [this, event.name].concat(args));
           });
           return;
         }
       }
 
       EventEmitter.emit.apply(null, [this, event.name].concat(args));
       return;