@@ -10,8 +10,10 @@ var LibraryBrowser = {
10
10
'$setMainLoop' ,
11
11
'$callUserCallback' ,
12
12
'emscripten_set_main_loop_timing' ,
13
+ #if ! MINIMAL_RUNTIME
13
14
'$runtimeKeepalivePush' ,
14
15
'$runtimeKeepalivePop'
16
+ #endif
15
17
] ,
16
18
$Browser__postset : 'Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas) { Browser.requestFullscreen(lockPointer, resizeCanvas) };\n' + // exports
17
19
#if ASSERTIONS
@@ -484,16 +486,16 @@ var LibraryBrowser = {
484
486
// abort and pause-aware versions TODO: build main loop on top of this?
485
487
486
488
safeRequestAnimationFrame : function ( func ) {
487
- runtimeKeepalivePush ( ) ;
489
+ { { { runtimeKeepalivePush ( ) ; } } }
488
490
return Browser . requestAnimationFrame ( function ( ) {
489
- runtimeKeepalivePop ( ) ;
491
+ { { { runtimeKeepalivePop ( ) ; } } }
490
492
callUserCallback ( func ) ;
491
493
} ) ;
492
494
} ,
493
495
safeSetTimeout : function ( func , timeout ) {
494
- runtimeKeepalivePush ( ) ;
496
+ { { { runtimeKeepalivePush ( ) ; } } }
495
497
return setTimeout ( function ( ) {
496
- runtimeKeepalivePop ( ) ;
498
+ { { { runtimeKeepalivePop ( ) ; } } }
497
499
callUserCallback ( func ) ;
498
500
} , timeout ) ;
499
501
} ,
@@ -779,18 +781,22 @@ var LibraryBrowser = {
779
781
}
780
782
} ,
781
783
782
- emscripten_async_wget__deps: [ '$PATH_FS' , '$runtimeKeepalivePush' , '$runtimeKeepalivePop' ] ,
784
+ emscripten_async_wget__deps: [ '$PATH_FS' ,
785
+ #if ! MINIMAL_RUNTIME
786
+ '$runtimeKeepalivePush' , '$runtimeKeepalivePop' ,
787
+ #endif
788
+ ] ,
783
789
emscripten_async_wget__proxy : 'sync' ,
784
790
emscripten_async_wget__sig : 'viiii' ,
785
791
emscripten_async_wget : function ( url , file , onload , onerror ) {
786
- runtimeKeepalivePush ( ) ;
792
+ { { { runtimeKeepalivePush ( ) ; } } }
787
793
788
794
var _url = UTF8ToString ( url ) ;
789
795
var _file = UTF8ToString ( file ) ;
790
796
_file = PATH_FS . resolve ( _file ) ;
791
797
function doCallback ( callback ) {
792
798
if ( callback ) {
793
- runtimeKeepalivePop ( ) ;
799
+ { { { runtimeKeepalivePop ( ) ; } } }
794
800
var stack = stackSave ( ) ;
795
801
{ { { makeDynCall ( 'vi' , 'callback' ) } } } ( allocate ( intArrayFromString ( _file ) , ALLOC_STACK ) ) ;
796
802
stackRestore ( stack ) ;
@@ -863,11 +869,15 @@ var LibraryBrowser = {
863
869
} , true /* no need for run dependency, this is async but will not do any prepare etc. step */ ) ;
864
870
} ,
865
871
866
- emscripten_async_wget2__deps : [ '$PATH_FS' , '$runtimeKeepalivePush' , '$runtimeKeepalivePop' ] ,
872
+ emscripten_async_wget2__deps : [ '$PATH_FS' ,
873
+ #if ! MINIMAL_RUNTIME
874
+ '$runtimeKeepalivePush' , '$runtimeKeepalivePop' ,
875
+ #endif
876
+ ] ,
867
877
emscripten_async_wget2__proxy : 'sync' ,
868
878
emscripten_async_wget2__sig : 'iiiiiiiii' ,
869
879
emscripten_async_wget2 : function ( url , file , request , param , arg , onload , onerror , onprogress ) {
870
- runtimeKeepalivePush ( ) ;
880
+ { { { runtimeKeepalivePush ( ) ; } } }
871
881
872
882
var _url = UTF8ToString ( url ) ;
873
883
var _file = UTF8ToString ( file ) ;
@@ -886,7 +896,7 @@ var LibraryBrowser = {
886
896
887
897
// LOAD
888
898
http . onload = function http_onload ( e ) {
889
- runtimeKeepalivePop ( ) ;
899
+ { { { runtimeKeepalivePop ( ) ; } } }
890
900
if ( http . status >= 200 && http . status < 300 ) {
891
901
// if a file exists there, we overwrite it
892
902
try {
@@ -910,7 +920,7 @@ var LibraryBrowser = {
910
920
911
921
// ERROR
912
922
http . onerror = function http_onerror ( e ) {
913
- runtimeKeepalivePop ( ) ;
923
+ { { { runtimeKeepalivePop ( ) ; } } }
914
924
if ( onerror ) { { { makeDynCall ( 'viii' , 'onerror' ) } } } ( handle , arg , http . status ) ;
915
925
delete Browser . wgetRequests [ handle ] ;
916
926
} ;
@@ -925,7 +935,7 @@ var LibraryBrowser = {
925
935
926
936
// ABORT
927
937
http . onabort = function http_onabort ( e ) {
928
- runtimeKeepalivePop ( ) ;
938
+ { { { runtimeKeepalivePop ( ) ; } } }
929
939
delete Browser . wgetRequests [ handle ] ;
930
940
} ;
931
941
@@ -1009,11 +1019,15 @@ var LibraryBrowser = {
1009
1019
}
1010
1020
} ,
1011
1021
1012
- emscripten_run_preload_plugins__deps : [ '$PATH' , '$runtimeKeepalivePush' , '$runtimeKeepalivePop' ] ,
1022
+ emscripten_run_preload_plugins__deps : [ '$PATH' ,
1023
+ #if ! MINIMAL_RUNTIME
1024
+ '$runtimeKeepalivePush' , '$runtimeKeepalivePop' ,
1025
+ #endif
1026
+ ] ,
1013
1027
emscripten_run_preload_plugins__proxy : 'sync' ,
1014
1028
emscripten_run_preload_plugins__sig : 'iiii' ,
1015
1029
emscripten_run_preload_plugins : function ( file , onload , onerror ) {
1016
- runtimeKeepalivePush ( ) ;
1030
+ { { { runtimeKeepalivePush ( ) ; } } }
1017
1031
1018
1032
var _file = UTF8ToString ( file ) ;
1019
1033
var data = FS . analyzePath ( _file ) ;
@@ -1023,23 +1037,25 @@ var LibraryBrowser = {
1023
1037
PATH . basename ( _file ) ,
1024
1038
new Uint8Array ( data . object . contents ) , true , true ,
1025
1039
function ( ) {
1026
- runtimeKeepalivePop ( ) ;
1040
+ { { { runtimeKeepalivePop ( ) ; } } }
1027
1041
if ( onload ) { { { makeDynCall ( 'vi' , 'onload' ) } } } ( file ) ;
1028
1042
} ,
1029
1043
function ( ) {
1030
- runtimeKeepalivePop ( ) ;
1044
+ { { { runtimeKeepalivePop ( ) ; } } }
1031
1045
if ( onerror ) { { { makeDynCall ( 'vi' , 'onerror' ) } } } ( file ) ;
1032
1046
} ,
1033
1047
true // don'tCreateFile - it's already there
1034
1048
) ;
1035
1049
return 0 ;
1036
1050
} ,
1037
1051
1052
+ #if ! MINIMAL_RUNTIME
1038
1053
emscripten_run_preload_plugins_data__deps: [ '$runtimeKeepalivePush' , '$runtimeKeepalivePop' ] ,
1054
+ #endif
1039
1055
emscripten_run_preload_plugins_data__proxy : 'sync' ,
1040
1056
emscripten_run_preload_plugins_data__sig : 'viiiiii' ,
1041
1057
emscripten_run_preload_plugins_data : function ( data , size , suffix , arg , onload , onerror ) {
1042
- runtimeKeepalivePush ( ) ;
1058
+ { { { runtimeKeepalivePush ( ) ; } } }
1043
1059
1044
1060
var _suffix = UTF8ToString ( suffix ) ;
1045
1061
if ( ! Browser . asyncPrepareDataCounter ) Browser . asyncPrepareDataCounter = 0 ;
@@ -1053,11 +1069,11 @@ var LibraryBrowser = {
1053
1069
{ { { makeHEAPView ( 'U8' , 'data' , 'data + size' ) } } } ,
1054
1070
true , true ,
1055
1071
function ( ) {
1056
- runtimeKeepalivePop ( ) ;
1072
+ { { { runtimeKeepalivePop ( ) ; } } }
1057
1073
if ( onload ) { { { makeDynCall ( 'vii' , 'onload' ) } } } ( arg , cname ) ;
1058
1074
} ,
1059
1075
function ( ) {
1060
- runtimeKeepalivePop ( ) ;
1076
+ { { { runtimeKeepalivePop ( ) ; } } }
1061
1077
if ( onerror ) { { { makeDynCall ( 'vi' , 'onerror' ) } } } ( arg ) ;
1062
1078
} ,
1063
1079
true // don'tCreateFile - it's already there
@@ -1084,12 +1100,12 @@ var LibraryBrowser = {
1084
1100
return onerror ? onerror ( ) : undefined ;
1085
1101
}
1086
1102
#endif
1087
- runtimeKeepalivePush ( ) ;
1103
+ { { { runtimeKeepalivePush ( ) ; } } }
1088
1104
1089
1105
assert ( runDependencies === 0 , 'async_load_script must be run when no other dependencies are active' ) ;
1090
1106
var script = document . createElement ( 'script' ) ;
1091
1107
script . onload = function script_onload ( ) {
1092
- runtimeKeepalivePop ( ) ;
1108
+ { { { runtimeKeepalivePop ( ) ; } } }
1093
1109
if ( onload ) {
1094
1110
if ( runDependencies > 0 ) {
1095
1111
dependenciesFulfilled = onload ;
@@ -1099,7 +1115,7 @@ var LibraryBrowser = {
1099
1115
}
1100
1116
} ;
1101
1117
script . onerror = function ( ) {
1102
- runtimeKeepalivePop ( ) ;
1118
+ { { { runtimeKeepalivePop ( ) ; } } }
1103
1119
if ( onerror ) onerror ( ) ;
1104
1120
} ;
1105
1121
script . src = UTF8ToString ( url ) ;
@@ -1127,7 +1143,7 @@ var LibraryBrowser = {
1127
1143
}
1128
1144
1129
1145
if ( ! Browser . mainLoop . timingSet ) {
1130
- runtimeKeepalivePush ( ) ;
1146
+ { { { runtimeKeepalivePush ( ) ; } } }
1131
1147
Browser . mainLoop . timingSet = true ;
1132
1148
}
1133
1149
if ( mode == 0 /*EM_TIMING_SETTIMEOUT*/ ) {
@@ -1236,7 +1252,7 @@ var LibraryBrowser = {
1236
1252
#if RUNTIME_DEBUG
1237
1253
err ( 'main loop exiting..' ) ;
1238
1254
#endif
1239
- runtimeKeepalivePop ( ) ;
1255
+ { { { runtimeKeepalivePop ( ) ; } } }
1240
1256
#if ! MINIMAL_RUNTIME
1241
1257
maybeExit ( ) ;
1242
1258
#endif
@@ -1252,7 +1268,7 @@ var LibraryBrowser = {
1252
1268
#if RUNTIME_DEBUG
1253
1269
err ( 'main loop exiting..' ) ;
1254
1270
#endif
1255
- runtimeKeepalivePop ( ) ;
1271
+ { { { runtimeKeepalivePop ( ) ; } } }
1256
1272
#if ! MINIMAL_RUNTIME
1257
1273
maybeExit ( ) ;
1258
1274
#endif
@@ -1309,7 +1325,7 @@ var LibraryBrowser = {
1309
1325
#if RUNTIME_DEBUG
1310
1326
err ( 'main loop exiting..' ) ;
1311
1327
#endif
1312
- runtimeKeepalivePop ( ) ;
1328
+ { { { runtimeKeepalivePop ( ) ; } } }
1313
1329
#if ! MINIMAL_RUNTIME
1314
1330
maybeExit ( ) ;
1315
1331
#endif
@@ -1485,7 +1501,7 @@ var LibraryBrowser = {
1485
1501
if ( msg . data [ 'finalResponse' ] ) {
1486
1502
info . awaited -- ;
1487
1503
info . callbacks [ callbackId ] = null ; // TODO: reuse callbackIds, compress this
1488
- runtimeKeepalivePop ( ) ;
1504
+ { { { runtimeKeepalivePop ( ) ; } } }
1489
1505
}
1490
1506
var data = msg . data [ 'data' ] ;
1491
1507
if ( data ) {
@@ -1525,7 +1541,7 @@ var LibraryBrowser = {
1525
1541
var callbackId = - 1 ;
1526
1542
if ( callback ) {
1527
1543
#if ! MINIMAL_RUNTIME
1528
- runtimeKeepalivePush ( ) ;
1544
+ { { { runtimeKeepalivePush ( ) ; } } }
1529
1545
#endif
1530
1546
callbackId = info . callbacks . length ;
1531
1547
info . callbacks . push ( {
0 commit comments