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

Check branch after a timeout.

This commit is contained in:
Kris Maglione
2011-02-14 16:54:20 -05:00
parent 0a008b6a51
commit baa296527e
2 changed files with 7 additions and 4 deletions

View File

@@ -160,6 +160,7 @@ defineModule.time = function time(major, minor, func, self) {
catch (e) {
loaded.util && util.reportError(e);
}
let delta = Date.now() - time;
defineModule.times.all += delta;
defineModule.times[major] = (defineModule.times[major] || 0) + delta;

View File

@@ -745,10 +745,12 @@ config.INIT = update(Object.create(config.INIT), config.INIT, {
load: function load(dactyl, modules, window) {
load.superapply(this, arguments);
if (this.branch && this.branch !== "default" &&
modules.yes_i_know_i_should_not_report_errors_in_these_branches_thanks.indexOf(this.branch) === -1)
dactyl.warn("You are running " + config.appName + " from a testing branch: " + this.branch + ". " +
"Please do not report errors which do not also occur in the default branch.");
this.timeout(function () {
if (this.branch && this.branch !== "default" &&
modules.yes_i_know_i_should_not_report_errors_in_these_branches_thanks.indexOf(this.branch) === -1)
dactyl.warn("You are running " + config.appName + " from a testing branch: " + this.branch + ". " +
"Please do not report errors which do not also occur in the default branch.");
}, 1000);
}
});