Loading layout/tools/layout-debug/ui/content/layoutdebug.js +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ var gWrittenProfile = false; const { E10SUtils } = ChromeUtils.import( "resource://gre/modules/E10SUtils.jsm" ); const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); const { Preferences } = ChromeUtils.import( "resource://gre/modules/Preferences.jsm" ); Loading Loading @@ -415,7 +414,7 @@ function dumpProfile() { gWritingProfile = true; let cwd = Services.dirsvc.get("CurWorkD", Ci.nsIFile).path; let filename = OS.Path.join(cwd, gArgs.profileFilename); let filename = PathUtils.join(cwd, gArgs.profileFilename); dump(`Writing profile to ${filename}...\n`); Loading layout/tools/reftest/reftest.jsm +14 −24 Original line number Diff line number Diff line Loading @@ -65,11 +65,6 @@ const { E10SUtils } = ChromeUtils.import( const lazy = {}; XPCOMUtils.defineLazyGetter(lazy, "OS", function() { const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); return OS; }); XPCOMUtils.defineLazyServiceGetters(lazy, { proxyService: [ "@mozilla.org/network/protocol-proxy-service;1", Loading Loading @@ -438,9 +433,8 @@ function ReadTests() { if (testList) { logger.debug("Reading test objects from: " + testList); let promise = lazy.OS.File.read(testList).then(function onSuccess(array) { let decoder = new TextDecoder(); g.urls = JSON.parse(decoder.decode(array)).map(CreateUrls); let promise = IOUtils.readJSON(testList).then(function onSuccess(json) { g.urls = json.map(CreateUrls); StartTests(); }).catch(function onFailure(e) { logger.error("Failed to load test objects: " + e); Loading Loading @@ -487,9 +481,7 @@ function ReadTests() { if (dumpTests) { logger.debug("Dumping test objects to file: " + dumpTests); let encoder = new TextEncoder(); let tests = encoder.encode(JSON.stringify(g.urls)); lazy.OS.File.writeAtomic(dumpTests, tests, {flush: true}).then( IOUtils.writeJSON(dumpTests, g.urls, { flush: true }).then( function onSuccess() { DoneTests(); }, Loading Loading @@ -1927,8 +1919,7 @@ function pdfjsHasLoadedPromise() { } function readPdf(path, callback) { lazy.OS.File.open(path, { read: true }).then(function (file) { file.read().then(function (data) { IOUtils.read(path).then(function (data) { pdfjsLib.GlobalWorkerOptions.workerSrc = "resource://pdf.js/build/pdf.worker.js"; pdfjsLib.getDocument({ data: data Loading @@ -1941,7 +1932,6 @@ function readPdf(path, callback) { }, function (e) { callback(new Error(`Couldn't read PDF ${path}, exception: ${e}`)); }); }); } function comparePdfs(pathToTestPdf, pathToRefPdf, callback) { Loading Loading
layout/tools/layout-debug/ui/content/layoutdebug.js +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ var gWrittenProfile = false; const { E10SUtils } = ChromeUtils.import( "resource://gre/modules/E10SUtils.jsm" ); const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); const { Preferences } = ChromeUtils.import( "resource://gre/modules/Preferences.jsm" ); Loading Loading @@ -415,7 +414,7 @@ function dumpProfile() { gWritingProfile = true; let cwd = Services.dirsvc.get("CurWorkD", Ci.nsIFile).path; let filename = OS.Path.join(cwd, gArgs.profileFilename); let filename = PathUtils.join(cwd, gArgs.profileFilename); dump(`Writing profile to ${filename}...\n`); Loading
layout/tools/reftest/reftest.jsm +14 −24 Original line number Diff line number Diff line Loading @@ -65,11 +65,6 @@ const { E10SUtils } = ChromeUtils.import( const lazy = {}; XPCOMUtils.defineLazyGetter(lazy, "OS", function() { const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); return OS; }); XPCOMUtils.defineLazyServiceGetters(lazy, { proxyService: [ "@mozilla.org/network/protocol-proxy-service;1", Loading Loading @@ -438,9 +433,8 @@ function ReadTests() { if (testList) { logger.debug("Reading test objects from: " + testList); let promise = lazy.OS.File.read(testList).then(function onSuccess(array) { let decoder = new TextDecoder(); g.urls = JSON.parse(decoder.decode(array)).map(CreateUrls); let promise = IOUtils.readJSON(testList).then(function onSuccess(json) { g.urls = json.map(CreateUrls); StartTests(); }).catch(function onFailure(e) { logger.error("Failed to load test objects: " + e); Loading Loading @@ -487,9 +481,7 @@ function ReadTests() { if (dumpTests) { logger.debug("Dumping test objects to file: " + dumpTests); let encoder = new TextEncoder(); let tests = encoder.encode(JSON.stringify(g.urls)); lazy.OS.File.writeAtomic(dumpTests, tests, {flush: true}).then( IOUtils.writeJSON(dumpTests, g.urls, { flush: true }).then( function onSuccess() { DoneTests(); }, Loading Loading @@ -1927,8 +1919,7 @@ function pdfjsHasLoadedPromise() { } function readPdf(path, callback) { lazy.OS.File.open(path, { read: true }).then(function (file) { file.read().then(function (data) { IOUtils.read(path).then(function (data) { pdfjsLib.GlobalWorkerOptions.workerSrc = "resource://pdf.js/build/pdf.worker.js"; pdfjsLib.getDocument({ data: data Loading @@ -1941,7 +1932,6 @@ function readPdf(path, callback) { }, function (e) { callback(new Error(`Couldn't read PDF ${path}, exception: ${e}`)); }); }); } function comparePdfs(pathToTestPdf, pathToRefPdf, callback) { Loading