Merge mozilla-central to autoland.
authorCosmin Sabou <csabou@mozilla.com>
Sat, 23 Feb 2019 23:42:13 +0200
changeset 518626 ae2027ea73251943b0e72e282104a6bf32078d06
parent 518625 55d2bf9bdad3f098e99db69810037efa6ea826cf (current diff)
parent 518621 492e4409f468f4841def795627356148d0bb7347 (diff)
child 518627 09c7b0032dac15e7c9c4976f78c284127a67988f
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)
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
Merge mozilla-central to autoland.
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -313,17 +313,17 @@ fuzzy-if(Android,0-3,0-50) fuzzy-if(skia
 == 280708-1a.html 280708-1-ref.html
 == 280708-1b.html 280708-1-ref.html
 == 281241-1.html 281241-1-ref.html
 == 281241-2.xhtml 281241-1-ref.html
 == 283686-1.html about:blank
 == 283686-2.html 283686-2-ref.html
 == 283686-3.html about:blank
 == 289384-1.xhtml 289384-ref.xhtml
-random-if(d2d) fuzzy-if(Android,0-8,0-1439) fuzzy-if(webrender,0-6,0-1250) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures
+random-if(d2d) fuzzy-if(Android,0-8,0-1439) fuzzy-if(webrender,0-6,0-2024) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures
 == 290129-1.html 290129-1-ref.html
 == 291078-1.html 291078-1-ref.html
 == 291078-2.html 291078-2-ref.html
 == 291262-1.html 291262-1-ref.html
 == 294306-1.html 294306-1a-ref.html
 != 294306-1.html 294306-1b-ref.html
 == 296361-1.html 296361-ref.html
 == 296904-1.html 296904-1-ref.html
--- a/testing/marionette/sync.js
+++ b/testing/marionette/sync.js
@@ -208,31 +208,28 @@ function TimedPromise(fn,
   if (typeof timeout != "number") {
     throw new TypeError();
   }
   if (!Number.isInteger(timeout) || timeout < 0) {
     throw new RangeError();
   }
 
   return new Promise((resolve, reject) => {
-    let trace;
-
     // Reject only if |throws| is given.  Otherwise it is assumed that
     // the user is OK with the promise timing out.
     let bail = () => {
       if (throws !== null) {
         let err = new throws();
         reject(err);
       } else {
-        log.warn(`TimedPromise timed out after ${timeout} ms`, trace);
+        log.warn(`TimedPromise timed out after ${timeout} ms`, stack());
         resolve();
       }
     };
 
-    trace = stack();
     timer.initWithCallback({notify: bail}, timeout, TYPE_ONE_SHOT);
 
     try {
       fn(resolve, reject);
     } catch (e) {
       reject(e);
     }
   }).then(res => {
@@ -257,24 +254,17 @@ function TimedPromise(fn,
  *     If `timeout` is not a number.
  * @throws {RangeError}
  *     If `timeout` is not an unsigned integer.
  */
 function Sleep(timeout) {
   if (typeof timeout != "number") {
     throw new TypeError();
   }
-  if (!Number.isInteger(timeout) || timeout < 0) {
-    throw new RangeError();
-  }
-
-  return new Promise(resolve => {
-    const timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-    timer.initWithCallback({notify: resolve}, timeout, TYPE_ONE_SHOT);
-  });
+  return new TimedPromise(() => {}, {timeout, throws: null});
 }
 
 /**
  * Detects when the specified message manager has been destroyed.
  *
  * One can observe the removal and detachment of a content browser
  * (`<xul:browser>`) or a chrome window by its message manager
  * disconnecting.