1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-20 08:55:47 +01:00

Prevent infinite loops when trying to execute mappings recursively.

This commit is contained in:
Kris Maglione
2011-01-18 18:09:28 -05:00
parent c78bb0f332
commit b836cc8110
4 changed files with 15 additions and 9 deletions

View File

@@ -110,7 +110,11 @@ var Map = Class("Map", {
if (this.names[0] != ".") // FIXME: Kludge.
mappings.repeat = repeat;
return dactyl.trapErrors(repeat);
dactyl.assert(!this.executing, "Attempt to execute mapping recursively");
this.executing = true;
let res = dactyl.trapErrors(repeat);
this.executing = false;
return res;
}
}, {