Skip to content

Commit 444abdf

Browse files
hajimehoshidmitshur
authored andcommitted
compiler/prelude: Remove remaining unused canBlock. (gopherjs#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.
1 parent 077f6d6 commit 444abdf

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/prelude/jsmapping.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,7 @@ var $externalizeFunction = function(v, t, passThis) {
158158
}
159159
args.push($internalize(arguments[i], t.params[i]));
160160
}
161-
var canBlock = $curGoroutine.canBlock;
162-
$curGoroutine.canBlock = false;
163-
try {
164-
var result = v.apply(passThis ? this : undefined, args);
165-
} finally {
166-
$curGoroutine.canBlock = canBlock;
167-
}
161+
var result = v.apply(passThis ? this : undefined, args);
168162
switch (t.results.length) {
169163
case 0:
170164
return;

0 commit comments

Comments
 (0)