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:
@@ -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;
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user