1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-24 14:15:46 +01:00

Finish moving dactyl.dump to util from last commit, and store the last 15 intercepted stack traces.

This commit is contained in:
Kris Maglione
2010-10-06 18:08:07 -04:00
parent 312244c00c
commit 8c98658e74
12 changed files with 34 additions and 36 deletions

View File

@@ -82,7 +82,6 @@ window.addEventListener("load", function onLoad() {
});
});
function dump(str) window.dump(String.replace(str, /\n?$/, "\n").replace(/^/m, services.get("dactyl:").name + ": "));
const start = Date.now();
const deferredInit = { load: [] };
const seen = set();
@@ -136,7 +135,7 @@ window.addEventListener("load", function onLoad() {
fn();
}
catch (e) {
dump("Loading " + (module && module.className) + ": " + e + "\n" + (e.stack || ""));
util.dump("Loading " + (module && module.className) + ": " + e + "\n" + (e.stack || ""));
}
return modules[module.className];
}
@@ -145,7 +144,7 @@ window.addEventListener("load", function onLoad() {
deferredInit["load"].forEach(call);
modules.times = update({}, defineModule.times);
dump("Loaded in " + (Date.now() - start) + "ms");
util.dump("Loaded in " + (Date.now() - start) + "ms");
}, false);
window.addEventListener("unload", function onUnload() {