Fix lock double-release.

The exclusive lock for from-JavaScript closure invocation was released
twice when an exception was raised during evaluation.
This commit is contained in:
Marc Burns 2014-02-25 16:45:02 -05:00
parent 04ce8e34fe
commit 1625670173

View File

@ -101,7 +101,6 @@
(succ || function () {}).apply(null, arguments); (succ || function () {}).apply(null, arguments);
}; };
var wrappedFail = function(err) { var wrappedFail = function(err) {
releaseLock();
(fail || function () {})(err); (fail || function () {})(err);
}; };
if (!(baselib.arity.isArityMatching(v.racketArity, args.length - 2))) { if (!(baselib.arity.isArityMatching(v.racketArity, args.length - 2))) {
@ -159,6 +158,7 @@
MACHINE.v = oldVal; MACHINE.v = oldVal;
MACHINE.a = oldArgcount; MACHINE.a = oldArgcount;
MACHINE.p = oldProc; MACHINE.p = oldProc;
// The lock is released by _trampoline in this case.
wrappedFail(e); wrappedFail(e);
}; };