mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-03 15:54:11 +01:00
Fix overlong stack generated by key events received during feedkeys, along with related "Attempt to execute mapping recursively" errors.
This commit is contained in:
@@ -1465,16 +1465,23 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
return results;
|
||||
},
|
||||
|
||||
yielders: 0,
|
||||
threadYield: function (flush, interruptable) {
|
||||
let mainThread = services.threading.mainThread;
|
||||
/* FIXME */
|
||||
util.interrupted = false;
|
||||
do {
|
||||
mainThread.processNextEvent(!flush);
|
||||
if (util.interrupted)
|
||||
throw new Error("Interrupted");
|
||||
this.yielders++;
|
||||
try {
|
||||
let mainThread = services.threading.mainThread;
|
||||
/* FIXME */
|
||||
util.interrupted = false;
|
||||
do {
|
||||
mainThread.processNextEvent(!flush);
|
||||
if (util.interrupted)
|
||||
throw new Error("Interrupted");
|
||||
}
|
||||
while (flush === true && mainThread.hasPendingEvents());
|
||||
}
|
||||
finally {
|
||||
this.yielders--;
|
||||
}
|
||||
while (flush === true && mainThread.hasPendingEvents());
|
||||
},
|
||||
|
||||
yieldable: function yieldable(func)
|
||||
|
||||
Reference in New Issue
Block a user