Bug 897683 - Uplift Add-on SDK to Firefox r=me
This commit is contained in:
@@ -68,19 +68,11 @@ exports.exit = function exit(code) {
|
||||
appStartup.quit(code ? E_ATTEMPT : E_FORCE);
|
||||
};
|
||||
|
||||
exports.stdout = new function() {
|
||||
let write = dump
|
||||
if ('logFile' in options && options.logFile) {
|
||||
let mode = PR_WRONLY | PR_CREATE_FILE | PR_APPEND;
|
||||
let stream = openFile(options.logFile, mode);
|
||||
write = function write(data) {
|
||||
let text = String(data);
|
||||
stream.write(text, text.length);
|
||||
stream.flush();
|
||||
}
|
||||
}
|
||||
return Object.freeze({ write: write });
|
||||
};
|
||||
// Adapter for nodejs's stdout & stderr:
|
||||
// http://nodejs.org/api/process.html#process_process_stdout
|
||||
let stdout = Object.freeze({ write: dump, end: dump });
|
||||
exports.stdout = stdout;
|
||||
exports.stderr = stdout;
|
||||
|
||||
/**
|
||||
* Returns a path of the system's or application's special directory / file
|
||||
@@ -134,7 +126,7 @@ exports.build = appInfo.appBuildID;
|
||||
exports.id = appInfo.ID;
|
||||
|
||||
/**
|
||||
* The name of the application.
|
||||
* The name of the application.
|
||||
*/
|
||||
exports.name = appInfo.name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user