From 6da196ef0852fff9d054b0b87247422016b19495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Tue, 28 Sep 2010 11:54:29 -0700 Subject: [PATCH] Bug 600066 - Don't use octal escape sequences in mochitest harness [r=ctalbert, a=NPOTB] --- testing/mochitest/chrome-harness.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testing/mochitest/chrome-harness.js b/testing/mochitest/chrome-harness.js index 8e1a6fd1e16..8beee7f5c36 100644 --- a/testing/mochitest/chrome-harness.js +++ b/testing/mochitest/chrome-harness.js @@ -275,7 +275,9 @@ function extractJarToTmp(jar) { .getService(Components.interfaces.nsIProperties) .get("ProfD", Components.interfaces.nsILocalFile); tmpdir.append("mochikit.tmp"); - tmpdir.createUnique(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777); + // parseInt is used because octal escape sequences cause deprecation warnings + // in strict mode (which is turned on in debug builds) + tmpdir.createUnique(Components.interfaces.nsIFile.DIRECTORY_TYPE, parseInt("0777", 8)); var zReader = Components.classes["@mozilla.org/libjar/zip-reader;1"]. createInstance(Components.interfaces.nsIZipReader); @@ -301,7 +303,9 @@ function extractJarToTmp(jar) { var dirs = zReader.findEntries(filepath + '*/'); while (dirs.hasMore()) { var targetDir = buildRelativePath(dirs.getNext(), tmpdir, filepath); - targetDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777); + // parseInt is used because octal escape sequences cause deprecation warnings + // in strict mode (which is turned on in debug builds) + targetDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, parseInt("0777", 8)); } //now do the files