Bug 1726734 - Replace deprecated octal sequences to satisfy ESLint no-octal-rule. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D128684
This commit is contained in:
msub2 2021-10-18 14:37:04 +00:00
Родитель 5e856096fc
Коммит d7037d2ab2
16 изменённых файлов: 27 добавлений и 29 удалений

Просмотреть файл

@ -355,7 +355,6 @@ module.exports = {
"no-nested-ternary": "off",
"no-new-object": "off",
"no-new-wrappers": "off",
"no-octal": "off",
"no-redeclare": "off",
"no-return-await": "off",
"no-restricted-globals": "off",
@ -474,7 +473,6 @@ module.exports = {
"no-empty": "off",
"no-eval": "off",
"no-lone-blocks": "off",
"no-octal": "off",
"no-redeclare": "off",
"no-shadow": "off",
"no-throw-literal": "off",

Просмотреть файл

@ -21,7 +21,7 @@ add_task(async function test() {
outStream.init(
file,
0x02 | 0x08 | 0x20, // write, create, truncate
0666,
0o666,
0
);
outStream.write(fileData, fileData.length);

Просмотреть файл

@ -14,7 +14,7 @@ addMessageListener("file.open", function(e) {
outStream.init(
testFile,
0x02 | 0x08 | 0x20, // write, create, truncate
0666,
0o666,
0
);
@ -41,7 +41,7 @@ addMessageListener("emptyfile.open", function(e) {
outStream.init(
testFile,
0x02 | 0x08 | 0x20, // write, create, truncate
0666,
0o666,
0
);

Просмотреть файл

@ -17,7 +17,7 @@ add_task(async function() {
outStream.init(
existingFile,
0x02 | 0x08 | 0x20, // write, create, truncate
0666,
0o666,
0
);

Просмотреть файл

@ -37,7 +37,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=702949
var file = FileUtils.getDir("TmpD", [], false);
file.append("testfile");
file.createUnique(SpecialPowers.Ci.nsIFile.NORMAL_FILE_TYPE, 0644);
file.createUnique(SpecialPowers.Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
SpecialPowers.wrap(i).value = file.path;
file.remove(/* recursive = */ false);

Просмотреть файл

@ -68,8 +68,8 @@ SetGetDelete(0x3);
SetGetDelete(0xa);
// Octal numbers as properties.
SetGetDelete(03);
SetGetDelete(07);
SetGetDelete(0o3);
SetGetDelete(0o7);
// String numbers as properties.
SetGetDelete('0');

Просмотреть файл

@ -33,17 +33,17 @@ function test_xul() {
// Test that OS.Constants.libc is defined
function test_libc() {
isnot(null, OS.Constants.libc, "OS.Constants.libc is defined");
is(0001, OS.Constants.libc.S_IXOTH, "OS.Constants.libc.S_IXOTH is defined");
is(0002, OS.Constants.libc.S_IWOTH, "OS.Constants.libc.S_IWOTH is defined");
is(0007, OS.Constants.libc.S_IRWXO, "OS.Constants.libc.S_IRWXO is defined");
is(0010, OS.Constants.libc.S_IXGRP, "OS.Constants.libc.S_IXGRP is defined");
is(0020, OS.Constants.libc.S_IWGRP, "OS.Constants.libc.S_IWGRP is defined");
is(0040, OS.Constants.libc.S_IRGRP, "OS.Constants.libc.S_IRGRP is defined");
is(0070, OS.Constants.libc.S_IRWXG, "OS.Constants.libc.S_IRWXG is defined");
is(0100, OS.Constants.libc.S_IXUSR, "OS.Constants.libc.S_IXUSR is defined");
is(0200, OS.Constants.libc.S_IWUSR, "OS.Constants.libc.S_IWUSR is defined");
is(0400, OS.Constants.libc.S_IRUSR, "OS.Constants.libc.S_IRUSR is defined");
is(0700, OS.Constants.libc.S_IRWXU, "OS.Constants.libc.S_IRWXU is defined");
is(0o001, OS.Constants.libc.S_IXOTH, "OS.Constants.libc.S_IXOTH is defined");
is(0o002, OS.Constants.libc.S_IWOTH, "OS.Constants.libc.S_IWOTH is defined");
is(0o007, OS.Constants.libc.S_IRWXO, "OS.Constants.libc.S_IRWXO is defined");
is(0o010, OS.Constants.libc.S_IXGRP, "OS.Constants.libc.S_IXGRP is defined");
is(0o020, OS.Constants.libc.S_IWGRP, "OS.Constants.libc.S_IWGRP is defined");
is(0o040, OS.Constants.libc.S_IRGRP, "OS.Constants.libc.S_IRGRP is defined");
is(0o070, OS.Constants.libc.S_IRWXG, "OS.Constants.libc.S_IRWXG is defined");
is(0o100, OS.Constants.libc.S_IXUSR, "OS.Constants.libc.S_IXUSR is defined");
is(0o200, OS.Constants.libc.S_IWUSR, "OS.Constants.libc.S_IWUSR is defined");
is(0o400, OS.Constants.libc.S_IRUSR, "OS.Constants.libc.S_IRUSR is defined");
is(0o700, OS.Constants.libc.S_IRWXU, "OS.Constants.libc.S_IRWXU is defined");
}
// Test that OS.Constants.Win is defined

Просмотреть файл

@ -41,7 +41,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=123456
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -40,7 +40,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -41,7 +41,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -40,7 +40,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -44,7 +44,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -41,7 +41,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -40,7 +40,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -41,7 +41,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();

Просмотреть файл

@ -41,7 +41,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=664783
var outStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0666, 0);
0o666, 0);
outStream.write(fileData, fileData.length);
outStream.close();