Permalink
Browse files

compiler/prelude: Remove remaining unused canBlock. (#706)

Most instances/uses of canBlock were removed in 2d0acd0.
This change removes another instance that was missed.
It also removes the try/finally block, which was added only for the purpose
of canBlock variable in 6e21f51, and shouldn't
have any other effect.
  • Loading branch information...
hajimehoshi authored and dmitshur committed Nov 2, 2017
1 parent 077f6d6 commit 444abdf920945de5d4a977b572bcc6c674d1e4eb
Showing with 1 addition and 7 deletions.
  1. +1 −7 compiler/prelude/jsmapping.go
@@ -158,13 +158,7 @@ var $externalizeFunction = function(v, t, passThis) {
}
args.push($internalize(arguments[i], t.params[i]));
}
var canBlock = $curGoroutine.canBlock;
$curGoroutine.canBlock = false;
try {
var result = v.apply(passThis ? this : undefined, args);
} finally {
$curGoroutine.canBlock = canBlock;
}
var result = v.apply(passThis ? this : undefined, args);
switch (t.results.length) {
case 0:
return;

0 comments on commit 444abdf

Please sign in to comment.