Bug 1129231 - Remove a couple JS octal constant warnings. r=fabrice
authorDave Hylands <dhylands@mozilla.com>
Wed, 04 Feb 2015 14:51:39 -0800
changeset 227535 ee41a05c47ee1f18e6cd736e462099e1912c6314
parent 227505 505ff14b24ee2630c8f7395d278659de2d302f9e
child 227536 4f1b69be79ddda8398d640e6bbd30f05cd5a43c7
push id28233
push usercbook@mozilla.com
push dateThu, 05 Feb 2015 13:22:30 +0000
treeherdermozilla-central@d2df44094059 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1129231
milestone38.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 1129231 - Remove a couple JS octal constant warnings. r=fabrice This has just the intended changes.
b2g/components/DirectoryProvider.js
toolkit/crashreporter/CrashSubmit.jsm
--- a/b2g/components/DirectoryProvider.js
+++ b/b2g/components/DirectoryProvider.js
@@ -222,17 +222,17 @@ DirectoryProvider.prototype = {
         // subdir is either a file or isn't writable. In either case we
         // can't use it.
         log("Error: " + dir.path + " is a file or isn't writable");
         return null;
       }
       // subdir doesn't exist, and the parent is writable, so try to
       // create it. This can fail if a file named updates exists.
       try {
-        dir.create(Ci.nsIFile.DIRECTORY_TYPE, 0770);
+        dir.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt('0770', 8));
       } catch (e) {
         // The create failed for some reason. We can't use it.
         log("Error: " + dir.path + " unable to create directory");
         return null;
       }
       return dir;
   },
 
--- a/toolkit/crashreporter/CrashSubmit.jsm
+++ b/toolkit/crashreporter/CrashSubmit.jsm
@@ -81,17 +81,17 @@ function getDir(name) {
   dir.append("Crash Reports");
   dir.append(name);
   return dir;
 }
 
 function writeFile(dirName, fileName, data) {
   let path = getDir(dirName);
   if (!path.exists())
-    path.create(Ci.nsIFile.DIRECTORY_TYPE, 0700);
+    path.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt('0700', 8));
   path.append(fileName);
   var fs = Cc["@mozilla.org/network/file-output-stream;1"].
            createInstance(Ci.nsIFileOutputStream);
   // open, write, truncate
   fs.init(path, -1, -1, 0);
   var os = Cc["@mozilla.org/intl/converter-output-stream;1"].
            createInstance(Ci.nsIConverterOutputStream);
   os.init(fs, "UTF-8", 0, 0x0000);