Skip to content

Commit ee58484

Browse files
authored
Simplify new Function call. NFC (#24794)
This code was originally added I suppose before rest/spread operators were allowed.
1 parent e0b5f9f commit ee58484

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/libhtml5_webgl.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,7 @@ function handleWebGLProxying(funcs) {
603603
funcs[i + '__deps'].push('$' + i + '_before_on_calling_thread');
604604
funcBody = `${i}_before_on_calling_thread(${funcArgsString}); ` + funcBody;
605605
}
606-
funcArgs.push(funcBody);
607-
funcs[i] = new (Function.prototype.bind.call(Function, Function, ...funcArgs));
606+
funcs[i] = new Function(funcArgs, funcBody);
608607
} else if (targetingOffscreenFramebuffer) {
609608
// When targeting only OFFSCREEN_FRAMEBUFFER, unconditionally proxy all GL
610609
// calls to main thread.

0 commit comments

Comments
 (0)