1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 09:17:59 +01:00

Fix potential races.

This commit is contained in:
Kris Maglione
2014-02-23 12:20:22 -08:00
parent 9470e18566
commit c37656f731
3 changed files with 10 additions and 7 deletions

View File

@@ -329,10 +329,11 @@ var Modes = Module("modes", {
{ push: push }, push);
for (let [id, { obj, prop, test }] in Iterator(this.boundProperties)) {
if (!obj.get())
obj = obj.get();
if (!obj)
delete this.boundProperties[id];
else
this.topOfStack.saved[id] = { obj: obj.get(), prop: prop, value: obj.get()[prop], test: test };
this.topOfStack.saved[id] = { obj: obj, prop: prop, value: obj[prop], test: test };
}
}