locker: fix destroy handling.

This commit is contained in:
Christopher Jeffrey 2016-12-21 14:46:06 -08:00
parent 24e6ed7a26
commit 583e479a80
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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)