Bug 1264159 - Use the new JS octal notation instead of parseInt when specifying octal numbers in browser code. r=standard8
authorJonathan Watt <jwatt@jwatt.org>
Fri, 08 Apr 2016 12:50:23 +0100
changeset 331147 a5b52c5e3c9619a3879e98d9e3cc54bac0ed88d9
parent 331146 30aa9ea0ad0c77ae3f8ce0868cf1b21829b0a530
child 331148 8d3682b0fc5b451fc9a13a917c7387e3f5afec88
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8
bugs1264159
milestone48.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
Bug 1264159 - Use the new JS octal notation instead of parseInt when specifying octal numbers in browser code. r=standard8
browser/components/sessionstore/test/browser_466937.js
browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm
--- a/browser/components/sessionstore/test/browser_466937.js
+++ b/browser/components/sessionstore/test/browser_466937.js
@@ -12,17 +12,17 @@ add_task(function test_prevent_file_stea
   // Add a tab with some file input fields.
   let tab = gBrowser.addTab(URL);
   let browser = tab.linkedBrowser;
   yield promiseBrowserLoaded(browser);
 
   // Generate a path to a 'secret' file.
   let file = Services.dirsvc.get("TmpD", Ci.nsIFile);
   file.append("466937_test.file");
-  file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, parseInt("666", 8));
+  file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
   let testPath = file.path;
 
   // Fill in form values.
   yield setInputValue(browser, {id: "reverse_thief", value: "/home/user/secret2"});
   yield setInputValue(browser, {id: "bystander", value: testPath});
 
   // Duplicate and check form values.
   let tab2 = gBrowser.duplicateTab(tab);
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm
@@ -35,17 +35,17 @@ let Screenshot = {
   _screenshotFunction: null,
 
   init(path, extensionPath, imagePrefix = "") {
     this._path = path;
 
     let dir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
     dir.initWithPath(this._path);
     if (!dir.exists()) {
-      dir.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt("0755", 8));
+      dir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
     }
 
     this._extensionPath = extensionPath;
     this._imagePrefix = imagePrefix;
     switch (Services.appinfo.OS) {
       case "WINNT":
         this._screenshotFunction = this._screenshotWindows;
         break;