author | André Bargull <andre.bargull@gmail.com> |
Mon, 27 Feb 2017 09:55:21 -0800 | |
changeset 345320 | bf500219a0fc2686ef6c669cedf6b7b0d15fb0d4 |
parent 345319 | fb3ac97e6e79798e44b489465b4cb0b303a01d8b |
child 345321 | 36040e95313752e6862dec18a18036785baf21c2 |
push id | 87557 |
push user | ryanvm@gmail.com |
push date | Wed, 01 Mar 2017 17:03:02 +0000 |
treeherder | mozilla-inbound@5ef0e255799d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | evilpie |
bugs | 1340146 |
milestone | 54.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
|
new file mode 100644 --- /dev/null +++ b/js/src/shell/.eslintrc.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../toolkit/.eslintrc.js" + ], + + "rules": { + // SpiderMonkey's style doesn't match any of the possible options. + "brace-style": "off", + } +};
--- a/js/src/shell/ModuleLoader.js +++ b/js/src/shell/ModuleLoader.js @@ -1,12 +1,14 @@ /* 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/. */ +/* global getModuleLoadPath setModuleResolveHook parseModule os */ + // A basic synchronous module loader for testing the shell. { // Save standard built-ins before scripts can modify them. const ArrayPrototypeJoin = Array.prototype.join; const MapPrototypeGet = Map.prototype.get; const MapPrototypeHas = Map.prototype.has; const MapPrototypeSet = Map.prototype.set; const ObjectDefineProperty = Object.defineProperty; @@ -49,20 +51,23 @@ const ReflectLoader = new class { // Remove the drive letter, if present. let isalpha = c => ("A" <= c && c <= "Z") || ("a" <= c && c <= "z"); let drive = ""; if (path.length > 2 && isalpha(path[0]) && path[1] === ":" && path[2] === "\\") { drive = ReflectApply(StringPrototypeSubstring, path, [0, 2]); path = ReflectApply(StringPrototypeSubstring, path, [2]); } +#endif - const pathsep = "\\"; + const pathsep = +#ifdef XP_WIN + "\\"; #else - const pathsep = "/"; + "/"; #endif let n = 0; let components = []; // Normalize the path by removing redundant path components. // NB: See above for why we don't call String.prototype.split here. let lastSep = 0;
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/processors/self-hosted.js +++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/processors/self-hosted.js @@ -3,17 +3,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"; -const selfHostedRegex = /js\/src\/builtin\/.*?\.js$/; +const selfHostedRegex = /js\/src\/(?:builtin|shell)\/.*?\.js$/; const macroRegex = /\s*\#(if|ifdef|else|elif|endif|include|define|undef).*/; module.exports = { preprocess: function(text, filename) { if (!selfHostedRegex.test(filename)) { return [text]; }