File tree Expand file tree Collapse file tree 2 files changed +25
-28
lines changed Expand file tree Collapse file tree 2 files changed +25
-28
lines changed Original file line number Diff line number Diff line change @@ -701,34 +701,6 @@ var LibraryBrowser = {
701
701
document . body . appendChild ( script ) ;
702
702
} ,
703
703
704
- $safeRequestAnimationFrame__deps : [ '$MainLoop' ] ,
705
- $safeRequestAnimationFrame : ( func ) => {
706
- { { { runtimeKeepalivePush ( ) } } }
707
- return MainLoop . requestAnimationFrame ( ( ) => {
708
- { { { runtimeKeepalivePop ( ) } } }
709
- callUserCallback ( func ) ;
710
- } ) ;
711
- } ,
712
-
713
- // Runs natively in pthread, no __proxy needed.
714
- emscripten_async_call__deps : [ '$safeSetTimeout' , '$safeRequestAnimationFrame' ] ,
715
- emscripten_async_call : ( func , arg , millis ) => {
716
- function wrapper ( ) {
717
- { { { makeDynCall ( 'vp' , 'func' ) } } } ( arg ) ;
718
- }
719
-
720
- if ( millis >= 0
721
- #if ENVIRONMENT_MAY_BE_NODE
722
- // node does not support requestAnimationFrame
723
- || ENVIRONMENT_IS_NODE
724
- #endif
725
- ) {
726
- safeSetTimeout ( wrapper , millis ) ;
727
- } else {
728
- safeRequestAnimationFrame ( wrapper ) ;
729
- }
730
- } ,
731
-
732
704
emscripten_get_window_title__proxy: 'sync' ,
733
705
emscripten_get_window_title : ( ) => {
734
706
var buflen = 256 ;
Original file line number Diff line number Diff line change @@ -33,6 +33,15 @@ LibraryJSEventLoop = {
33
33
return id ;
34
34
} ,
35
35
36
+ $safeRequestAnimationFrame__deps : [ '$MainLoop' ] ,
37
+ $safeRequestAnimationFrame : ( func ) => {
38
+ { { { runtimeKeepalivePush ( ) } } }
39
+ return MainLoop . requestAnimationFrame ( ( ) => {
40
+ { { { runtimeKeepalivePop ( ) } } }
41
+ callUserCallback ( func ) ;
42
+ } ) ;
43
+ } ,
44
+
36
45
// Just like clearImmediate but takes an i32 rather than an object.
37
46
$clearImmediateWrapped : ( id ) => {
38
47
#if ASSERTIONS
@@ -149,6 +158,22 @@ LibraryJSEventLoop = {
149
158
clearInterval ( id ) ;
150
159
} ,
151
160
161
+ emscripten_async_call__deps : [ '$safeSetTimeout' , '$safeRequestAnimationFrame' ] ,
162
+ emscripten_async_call : ( func , arg , millis ) => {
163
+ var wrapper = ( ) => { { { makeDynCall ( 'vp' , 'func' ) } } } ( arg ) ;
164
+
165
+ if ( millis >= 0
166
+ #if ENVIRONMENT_MAY_BE_NODE
167
+ // node does not support requestAnimationFrame
168
+ || ENVIRONMENT_IS_NODE
169
+ #endif
170
+ ) {
171
+ safeSetTimeout ( wrapper , millis ) ;
172
+ } else {
173
+ safeRequestAnimationFrame ( wrapper ) ;
174
+ }
175
+ } ,
176
+
152
177
$registerPostMainLoop : ( f ) => {
153
178
// Does nothing unless $MainLoop is included/used.
154
179
typeof MainLoop != 'undefined' && MainLoop . postMainLoop . push ( f ) ;
You can’t perform that action at this time.
0 commit comments