locker: fix destroy handling.
This commit is contained in:
parent
24e6ed7a26
commit
583e479a80
@ -145,7 +145,7 @@ Locker.prototype.lock = function lock(arg1, arg2) {
|
||||
Locker.prototype.unlock = function unlock() {
|
||||
var job;
|
||||
|
||||
assert(this.busy);
|
||||
assert(this.destroyed || this.busy);
|
||||
|
||||
this.busy = false;
|
||||
this.current = null;
|
||||
@ -353,7 +353,7 @@ MappedLock.prototype.unlock = function unlock(key) {
|
||||
var jobs = self.jobs[key];
|
||||
var job;
|
||||
|
||||
assert(self.busy[key]);
|
||||
assert(self.destroyed || self.busy[key]);
|
||||
delete self.busy[key];
|
||||
|
||||
if (!jobs)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user