diff --git a/.eslintrc.js b/.eslintrc.js index e371be682336..48c39ce27f6d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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", diff --git a/dom/fetch/tests/browser_blobFromFile.js b/dom/fetch/tests/browser_blobFromFile.js index 80c9a13113a7..64a34a72d622 100644 --- a/dom/fetch/tests/browser_blobFromFile.js +++ b/dom/fetch/tests/browser_blobFromFile.js @@ -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); diff --git a/dom/file/ipc/tests/script_file.js b/dom/file/ipc/tests/script_file.js index d3147a9b1642..56defe1f0b7e 100644 --- a/dom/file/ipc/tests/script_file.js +++ b/dom/file/ipc/tests/script_file.js @@ -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 ); diff --git a/dom/file/tests/test_createFile.js b/dom/file/tests/test_createFile.js index 046d62ded752..cfdb356b0bbe 100644 --- a/dom/file/tests/test_createFile.js +++ b/dom/file/tests/test_createFile.js @@ -17,7 +17,7 @@ add_task(async function() { outStream.init( existingFile, 0x02 | 0x08 | 0x20, // write, create, truncate - 0666, + 0o666, 0 ); diff --git a/dom/html/test/forms/test_submit_invalid_file.html b/dom/html/test/forms/test_submit_invalid_file.html index 33f71b594591..cffce2e2925d 100644 --- a/dom/html/test/forms/test_submit_invalid_file.html +++ b/dom/html/test/forms/test_submit_invalid_file.html @@ -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); diff --git a/dom/html/test/test_bug658746.html b/dom/html/test/test_bug658746.html index b3b45e766585..859a92dde579 100644 --- a/dom/html/test/test_bug658746.html +++ b/dom/html/test/test_bug658746.html @@ -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'); diff --git a/dom/system/tests/test_constants.xhtml b/dom/system/tests/test_constants.xhtml index e5afc67f1df5..0843d2d327e3 100644 --- a/dom/system/tests/test_constants.xhtml +++ b/dom/system/tests/test_constants.xhtml @@ -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 diff --git a/dom/workers/test/test_file.xhtml b/dom/workers/test/test_file.xhtml index a75045a056e1..2b628e7f4d16 100644 --- a/dom/workers/test/test_file.xhtml +++ b/dom/workers/test/test_file.xhtml @@ -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(); diff --git a/dom/workers/test/test_fileBlobPosting.xhtml b/dom/workers/test/test_fileBlobPosting.xhtml index 060841419cf1..61f4a8e90955 100644 --- a/dom/workers/test/test_fileBlobPosting.xhtml +++ b/dom/workers/test/test_fileBlobPosting.xhtml @@ -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(); diff --git a/dom/workers/test/test_fileBlobSubWorker.xhtml b/dom/workers/test/test_fileBlobSubWorker.xhtml index 00d23f0e0b93..8b6755278831 100644 --- a/dom/workers/test/test_fileBlobSubWorker.xhtml +++ b/dom/workers/test/test_fileBlobSubWorker.xhtml @@ -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(); diff --git a/dom/workers/test/test_filePosting.xhtml b/dom/workers/test/test_filePosting.xhtml index f0d7979c12ae..3ffa219516bc 100644 --- a/dom/workers/test/test_filePosting.xhtml +++ b/dom/workers/test/test_filePosting.xhtml @@ -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(); diff --git a/dom/workers/test/test_fileReadSlice.xhtml b/dom/workers/test/test_fileReadSlice.xhtml index 8ca62d78c5e5..b035fa287215 100644 --- a/dom/workers/test/test_fileReadSlice.xhtml +++ b/dom/workers/test/test_fileReadSlice.xhtml @@ -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(); diff --git a/dom/workers/test/test_fileReaderSync.xhtml b/dom/workers/test/test_fileReaderSync.xhtml index 9eafea31a14b..7cdcaed791e2 100644 --- a/dom/workers/test/test_fileReaderSync.xhtml +++ b/dom/workers/test/test_fileReaderSync.xhtml @@ -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(); diff --git a/dom/workers/test/test_fileReaderSyncErrors.xhtml b/dom/workers/test/test_fileReaderSyncErrors.xhtml index e2b48dd43266..626b67e1baac 100644 --- a/dom/workers/test/test_fileReaderSyncErrors.xhtml +++ b/dom/workers/test/test_fileReaderSyncErrors.xhtml @@ -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(); diff --git a/dom/workers/test/test_fileSlice.xhtml b/dom/workers/test/test_fileSlice.xhtml index 371b7e537692..b683db2ec9d4 100644 --- a/dom/workers/test/test_fileSlice.xhtml +++ b/dom/workers/test/test_fileSlice.xhtml @@ -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(); diff --git a/dom/workers/test/test_fileSubWorker.xhtml b/dom/workers/test/test_fileSubWorker.xhtml index 908b81c88c6b..92aa3b1a171b 100644 --- a/dom/workers/test/test_fileSubWorker.xhtml +++ b/dom/workers/test/test_fileSubWorker.xhtml @@ -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();