Skip to content

Commit c03d6df

Browse files
committed
Remove a no-longer-needed closure workaround. NFC
This workaround was added in #9989, I assume because one or more tests failed without.
1 parent af2bc13 commit c03d6df

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/library_browser.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ var LibraryBrowser = {
4444
// main loop that is currently allowed to run. All previous main loops
4545
// will quit themselves. This is incremented whenever a new main loop is
4646
// created.
47-
/** @type{number} */
4847
currentlyRunningMainloop: 0,
4948
// The main loop tick function that will be called at each iteration.
5049
func: null,
@@ -914,20 +913,7 @@ var LibraryBrowser = {
914913
Browser.mainLoop.func = browserIterationFunc;
915914
Browser.mainLoop.arg = arg;
916915

917-
#if MAYBE_CLOSURE_COMPILER
918-
// Closure compiler bug(?): Closure does not see that the assignment
919-
// var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop
920-
// is a value copy of a number (even with the JSDoc @type annotation)
921-
// but optimizeis the code as if the assignment was a reference assignment,
922-
// which results in Browser.mainLoop.pause() not working. Hence use a
923-
// workaround to make Closure believe this is a value copy that should occur:
924-
// (TODO: Minimize this down to a small test case and report - was unable
925-
// to reproduce in a small written test case)
926-
/** @type{number} */
927-
var thisMainLoopId = (() => Browser.mainLoop.currentlyRunningMainloop)();
928-
#else
929916
var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop;
930-
#endif
931917
function checkIsRunning() {
932918
if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) {
933919
#if RUNTIME_DEBUG

0 commit comments

Comments
 (0)