1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 01:42:26 +01:00

Fix prefixing of dump messages from base.jsm.

This commit is contained in:
Kris Maglione
2010-10-08 15:31:53 -04:00
parent ff224d81c1
commit 9ed5d069ee
4 changed files with 21 additions and 17 deletions

View File

@@ -231,15 +231,7 @@ const Util = Module("Util", {
*
* @param {string|Object} msg The message to print.
*/
dump: function dump_() {
let msg = Array.map(arguments, function (msg) {
if (typeof msg == "object")
msg = util.objectToString(msg);
return msg;
}).join(", ");
msg = String.replace(msg, /\n?$/, "\n");
dump(msg.replace(/^./gm, services.get("dactyl:").name + ": $&"));
},
dump: defineModule.dump,
/**
* Dumps a stack trace to the console.