Backed out changeset 35420ca15900 (bug 1379256)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 12 Aug 2017 13:48:06 +0200
changeset 374430 5f15be9e9ee6cd1101c6bc5eeaba1b4d610fa0a3
parent 374429 cbac131f1bf85344333b26ff875e051891ef7954
child 374431 e95831a33a2ef6dd321fe896ac86c0e0bcab1e32
push id93678
push userarchaeopteryx@coole-files.de
push dateSat, 12 Aug 2017 23:17:05 +0000
treeherdermozilla-inbound@a79ccbfacad8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1379256
milestone57.0a1
backs out35420ca15900cc83a3a3909ba097bef0c68d67b6
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 changeset 35420ca15900 (bug 1379256)
toolkit/components/osfile/.eslintrc.js
toolkit/components/osfile/modules/osfile_async_worker.js
toolkit/components/osfile/modules/osfile_shared_allthreads.jsm
toolkit/components/osfile/modules/osfile_shared_front.jsm
toolkit/components/osfile/modules/osfile_unix_allthreads.jsm
toolkit/components/osfile/modules/osfile_unix_back.jsm
toolkit/components/osfile/modules/osfile_unix_front.jsm
toolkit/components/osfile/modules/osfile_win_allthreads.jsm
toolkit/components/osfile/modules/osfile_win_back.jsm
toolkit/components/osfile/modules/osfile_win_front.jsm
toolkit/components/osfile/modules/ospath.jsm
toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
toolkit/components/osfile/tests/mochi/worker_test_osfile_comms.js
toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js
toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js
toolkit/components/osfile/tests/mochi/worker_test_osfile_win.js
--- a/toolkit/components/osfile/.eslintrc.js
+++ b/toolkit/components/osfile/.eslintrc.js
@@ -3,12 +3,13 @@
 module.exports = {
   "rules": {
     "consistent-return": "off",
     "no-irregular-whitespace": "off",
     "no-lone-blocks": "off",
     "no-redeclare": "off",
     "no-self-assign": "off",
     "no-shadow": "off",
+    "no-undef": "off",
     "no-unused-vars": "off",
     "object-shorthand": "off",
   }
 };
--- a/toolkit/components/osfile/modules/osfile_async_worker.js
+++ b/toolkit/components/osfile/modules/osfile_async_worker.js
@@ -1,13 +1,12 @@
 /* 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/. */
 
-/* eslint-env worker */
 
 if (this.Components) {
   throw new Error("This worker can only be loaded from a worker thread");
 }
 
 // Worker thread for osfile asynchronous front-end
 
 (function(exports) {
--- a/toolkit/components/osfile/modules/osfile_shared_allthreads.jsm
+++ b/toolkit/components/osfile/modules/osfile_shared_allthreads.jsm
@@ -12,18 +12,16 @@
  * - the base constants;
  * - base types and primitives for declaring new types;
  * - primitives for importing C functions;
  * - primitives for dealing with integers, pointers, typed arrays;
  * - the base class OSError;
  * - a few additional utilities.
  */
 
-/* eslint-env worker */
-
 // Boilerplate used to be able to import this module both from the main
 // thread and from worker threads.
 
 // Since const is lexically scoped, hoist the
 // conditionally-useful definition ourselves.
 const Cu = typeof Components != "undefined" ? Components.utils : undefined;
 const Ci = typeof Components != "undefined" ? Components.interfaces : undefined;
 const Cc = typeof Components != "undefined" ? Components.classes : undefined;
@@ -86,17 +84,16 @@ var Config = {
 };
 exports.Config = Config;
 
 // //////////////////// OS Constants
 
 if (typeof Components != "undefined") {
   // On the main thread, OS.Constants is defined by a xpcom
   // component. On other threads, it is available automatically
-  /* global OS */
   Cu.import("resource://gre/modules/ctypes.jsm");
   Cc["@mozilla.org/net/osfileconstantsservice;1"].
     getService(Ci.nsIOSFileConstantsService).init();
 }
 
 exports.Constants = OS.Constants;
 
 // /////////////////// Utilities
--- a/toolkit/components/osfile/modules/osfile_shared_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_shared_front.jsm
@@ -4,19 +4,16 @@
 
 /**
  * Code shared by OS.File front-ends.
  *
  * This code is meant to be included by another library. It is also meant to
  * be executed only on a worker thread.
  */
 
-/* eslint-env node */
-/* global OS */
-
 if (typeof Components != "undefined") {
   throw new Error("osfile_shared_front.jsm cannot be used from the main thread");
 }
 (function(exports) {
 
 var SharedAll =
   require("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
 var Path = require("resource://gre/modules/osfile/ospath.jsm");
--- a/toolkit/components/osfile/modules/osfile_unix_allthreads.jsm
+++ b/toolkit/components/osfile/modules/osfile_unix_allthreads.jsm
@@ -12,18 +12,16 @@
  * - define OS.Unix.Error;
  * - define a few constants and types that need to be defined on all platforms.
  *
  * This module can be:
  * - opened from the main thread as a jsm module;
  * - opened from a chrome worker through require().
  */
 
-/* eslint-env node */
-
 "use strict";
 
 var SharedAll;
 if (typeof Components != "undefined") {
   let Cu = Components.utils;
   // Module is opened as a jsm module
   Cu.import("resource://gre/modules/ctypes.jsm", this);
 
--- a/toolkit/components/osfile/modules/osfile_unix_back.jsm
+++ b/toolkit/components/osfile/modules/osfile_unix_back.jsm
@@ -1,15 +1,12 @@
 /* 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/. */
 
-/* eslint-env mozilla/chrome-worker, node */
-/* global OS */
-
 {
   if (typeof Components != "undefined") {
     // We do not wish osfile_unix_back.jsm to be used directly as a main thread
     // module yet. When time comes, it will be loaded by a combination of
     // a main thread front-end/worker thread implementation that makes sure
     // that we are not executing synchronous IO code in the main thread.
 
     throw new Error("osfile_unix_back.jsm cannot be used from the main thread yet");
--- a/toolkit/components/osfile/modules/osfile_unix_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_unix_front.jsm
@@ -4,19 +4,16 @@
 
 /**
  * Synchronous front-end for the JavaScript OS.File library.
  * Unix implementation.
  *
  * This front-end is meant to be imported by a worker thread.
  */
 
-/* eslint-env mozilla/chrome-worker, node */
-/* global OS */
-
 {
   if (typeof Components != "undefined") {
     // We do not wish osfile_unix_front.jsm to be used directly as a main thread
     // module yet.
 
     throw new Error("osfile_unix_front.jsm cannot be used from the main thread yet");
   }
   (function(exports) {
--- a/toolkit/components/osfile/modules/osfile_win_allthreads.jsm
+++ b/toolkit/components/osfile/modules/osfile_win_allthreads.jsm
@@ -12,18 +12,16 @@
  * - define OS.Shared.Win.Error;
  * - define a few constants and types that need to be defined on all platforms.
  *
  * This module can be:
  * - opened from the main thread as a jsm module;
  * - opened from a chrome worker through require().
  */
 
-/* eslint-env node */
-
 "use strict";
 
 var SharedAll;
 if (typeof Components != "undefined") {
   let Cu = Components.utils;
   // Module is opened as a jsm module
   Cu.import("resource://gre/modules/ctypes.jsm", this);
 
--- a/toolkit/components/osfile/modules/osfile_win_back.jsm
+++ b/toolkit/components/osfile/modules/osfile_win_back.jsm
@@ -14,19 +14,16 @@
  *    resides in the worker thread)
  *   (bug 729057)
  *
  * 3. included from the osfile worker thread using importScript
  *   (it serves to define the implementation of the asynchronous API)
  *   (bug 729057)
  */
 
-/* eslint-env mozilla/chrome-worker, node */
-/* global OS */
-
 {
   if (typeof Components != "undefined") {
     // We do not wish osfile_win.jsm to be used directly as a main thread
     // module yet. When time comes, it will be loaded by a combination of
     // a main thread front-end/worker thread implementation that makes sure
     // that we are not executing synchronous IO code in the main thread.
 
     throw new Error("osfile_win.jsm cannot be used from the main thread yet");
--- a/toolkit/components/osfile/modules/osfile_win_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_win_front.jsm
@@ -4,19 +4,16 @@
 
 /**
  * Synchronous front-end for the JavaScript OS.File library.
  * Windows implementation.
  *
  * This front-end is meant to be imported by a worker thread.
  */
 
-/* eslint-env mozilla/chrome-worker, node */
-/* global OS */
-
 {
   if (typeof Components != "undefined") {
     // We do not wish osfile_win_front.jsm to be used directly as a main thread
     // module yet.
     throw new Error("osfile_win_front.jsm cannot be used from the main thread yet");
   }
 
   (function(exports) {
--- a/toolkit/components/osfile/modules/ospath.jsm
+++ b/toolkit/components/osfile/modules/ospath.jsm
@@ -10,19 +10,16 @@
  * of this module will only work with the following assumptions:
  *
  * - paths are valid;
  * - paths are defined with one of the grammars that this module can
  *   parse (see later);
  * - all path concatenations go through function |join|.
  */
 
-/* global OS */
-/* eslint-env node */
-
 "use strict";
 
 if (typeof Components == "undefined") {
   let Path;
   if (OS.Constants.Win) {
     Path = require("resource://gre/modules/osfile/ospath_win.jsm");
   } else {
     Path = require("resource://gre/modules/osfile/ospath_unix.jsm");
--- a/toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
+++ b/toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
@@ -33,20 +33,20 @@ var maketest = function(prefix, test) {
       myinfo(prefix + ": " + m);
     },
     fail: function fail(m) {
       utils.ok(false, m);
     },
     okpromise: function okpromise(t, m) {
       return t.then(
         function onSuccess() {
-          utils.ok(true, m);
+          util.ok(true, m);
         },
         function onFailure() {
-          utils.ok(false, m);
+          util.ok(false, m);
         }
       );
     }
   };
   return function runtest() {
     utils.info("Entering");
     try {
       let result = test.call(this, utils);
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_comms.js
+++ b/toolkit/components/osfile/tests/mochi/worker_test_osfile_comms.js
@@ -1,13 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-/* eslint-env mozilla/chrome-worker, node */
-
 "use strict";
 
 importScripts("worker_test_osfile_shared.js");
 
 // The set of samples for communications test. Declare as a global
 // variable to prevent this from being garbage-collected too early.
 var samples;
 
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js
+++ b/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js
@@ -1,13 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-/* eslint-env mozilla/chrome-worker, node */
-
 importScripts("worker_test_osfile_shared.js");
 importScripts("resource://gre/modules/workers/require.js");
 
 var SharedAll = require("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
 SharedAll.Config.DEBUG = true;
 
 function should_throw(f) {
   try {
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js
+++ b/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js
@@ -1,14 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-/* eslint-env mozilla/chrome-worker, node */
-
-
 importScripts("worker_test_osfile_shared.js");
 
 self.onmessage = function(msg) {
   log("received message " + JSON.stringify(msg.data));
   self.onmessage = function(msg) {
     log("ignored message " + JSON.stringify(msg.data));
   };
   test_init();
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_win.js
+++ b/toolkit/components/osfile/tests/mochi/worker_test_osfile_win.js
@@ -1,13 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-/* eslint-env mozilla/chrome-worker, node */
-
 importScripts("worker_test_osfile_shared.js");
 
 self.onmessage = function(msg) {
   self.onmessage = function(msg) {
     log("ignored message " + JSON.stringify(msg.data));
   };
 
   test_init();