File tree Expand file tree Collapse file tree 1 file changed +2
-27
lines changed Expand file tree Collapse file tree 1 file changed +2
-27
lines changed Original file line number Diff line number Diff line change @@ -488,42 +488,17 @@ var LibraryBrowser = {
488
488
489
489
// abort and pause-aware versions TODO: build main loop on top of this?
490
490
491
- allowAsyncCallbacks : true ,
492
- queuedAsyncCallbacks : [ ] ,
493
-
494
- pauseAsyncCallbacks : function ( ) {
495
- Browser . allowAsyncCallbacks = false ;
496
- } ,
497
- resumeAsyncCallbacks : function ( ) { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now
498
- Browser . allowAsyncCallbacks = true ;
499
- if ( Browser . queuedAsyncCallbacks . length > 0 ) {
500
- var callbacks = Browser . queuedAsyncCallbacks ;
501
- Browser . queuedAsyncCallbacks = [ ] ;
502
- callbacks . forEach ( function ( func ) {
503
- func ( ) ;
504
- } ) ;
505
- }
506
- } ,
507
-
508
491
safeRequestAnimationFrame : function ( func ) {
509
492
return Browser . requestAnimationFrame ( function ( ) {
510
493
if ( ABORT ) return ;
511
- if ( Browser . allowAsyncCallbacks ) {
512
- func ( ) ;
513
- } else {
514
- Browser . queuedAsyncCallbacks . push ( func ) ;
515
- }
494
+ func ( ) ;
516
495
} ) ;
517
496
} ,
518
497
safeSetTimeout : function ( func , timeout ) {
519
498
noExitRuntime = true ;
520
499
return setTimeout ( function ( ) {
521
500
if ( ABORT ) return ;
522
- if ( Browser . allowAsyncCallbacks ) {
523
- func ( ) ;
524
- } else {
525
- Browser . queuedAsyncCallbacks . push ( func ) ;
526
- }
501
+ func ( ) ;
527
502
} , timeout ) ;
528
503
} ,
529
504
safeSetInterval : function ( func , timeout ) {
You can’t perform that action at this time.
0 commit comments