@@ -210,7 +210,7 @@ var LibraryTracing = {
210
210
} ,
211
211
212
212
emscripten_trace_record_allocation : ( address , size ) => {
213
- if ( typeof Module [ 'onMalloc' ] == 'function' ) Module [ 'onMalloc' ] ( address , size ) ;
213
+ Module [ 'onMalloc' ] ?. ( address , size ) ;
214
214
if ( EmscriptenTrace . postEnabled ) {
215
215
var now = EmscriptenTrace . now ( ) ;
216
216
EmscriptenTrace . post ( [ EmscriptenTrace . EVENT_ALLOCATE ,
@@ -219,7 +219,7 @@ var LibraryTracing = {
219
219
} ,
220
220
221
221
emscripten_trace_record_reallocation : ( old_address , new_address , size ) => {
222
- if ( typeof Module [ 'onRealloc' ] == 'function' ) Module [ 'onRealloc' ] ( old_address , new_address , size ) ;
222
+ Module [ 'onRealloc' ] ?. ( old_address , new_address , size ) ;
223
223
if ( EmscriptenTrace . postEnabled ) {
224
224
var now = EmscriptenTrace . now ( ) ;
225
225
EmscriptenTrace . post ( [ EmscriptenTrace . EVENT_REALLOCATE ,
@@ -228,7 +228,7 @@ var LibraryTracing = {
228
228
} ,
229
229
230
230
emscripten_trace_record_free : ( address ) => {
231
- if ( typeof Module [ 'onFree' ] == 'function' ) Module [ 'onFree' ] ( address ) ;
231
+ Module [ 'onFree' ] ?. ( address ) ;
232
232
if ( EmscriptenTrace . postEnabled ) {
233
233
var now = EmscriptenTrace . now ( ) ;
234
234
EmscriptenTrace . post ( [ EmscriptenTrace . EVENT_FREE ,
@@ -266,7 +266,7 @@ var LibraryTracing = {
266
266
}
267
267
} ,
268
268
269
- emscripten_trace_report_off_heap_data : function ( ) {
269
+ emscripten_trace_report_off_heap_data : ( ) => {
270
270
function openal_audiodata_size ( ) {
271
271
if ( typeof AL == 'undefined' || ! AL . currentContext ) {
272
272
return 0 ;
0 commit comments