1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-09 13:45:47 +01:00

Make :yank :extensions work as expected.

This commit is contained in:
Kris Maglione
2011-01-22 04:59:46 -05:00
parent f536b56ff3
commit 3f0901ee2a
4 changed files with 12 additions and 2 deletions

View File

@@ -803,8 +803,8 @@ var CompletionContext = Class("CompletionContext", {
*/
wait: function wait(interruptable, timeout) {
let end = Date.now() + timeout;
while (this.incomplete && (!timeout || Date.now() > end))
util.threadYield(false, interruptable);
util.waitFor(function () !this.incomplete || (this.timeout && Date.now() > end),
this);
return this.incomplete;
}
}, {

View File

@@ -1507,6 +1507,10 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
this.yielders--;
}
},
waitFor: function waitFor(test, self, interruptable) {
while (!test.call(self))
this.threadYield(false, interruptable);
},
yieldable: function yieldable(func)
function magic() {