@@ -1258,37 +1258,55 @@ wasm_runtime_destroy_registered_module_list()
1258
1258
{
1259
1259
WASMRegisteredModule * reg_module = NULL ;
1260
1260
1261
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1261
1262
os_mutex_lock (& registered_module_list_lock );
1263
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1262
1264
reg_module = bh_list_first_elem (registered_module_list );
1265
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1263
1266
while (reg_module ) {
1267
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1264
1268
WASMRegisteredModule * next_reg_module = bh_list_elem_next (reg_module );
1269
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1265
1270
1266
1271
bh_list_remove (registered_module_list , reg_module );
1272
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1267
1273
1268
1274
/* now, it is time to release every module in the runtime */
1269
1275
if (reg_module -> module -> module_type == Wasm_Module_Bytecode ) {
1276
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1270
1277
#if WASM_ENABLE_INTERP != 0
1271
1278
wasm_unload ((WASMModule * )reg_module -> module );
1272
1279
#endif
1280
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1273
1281
}
1274
1282
else {
1283
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1275
1284
#if WASM_ENABLE_AOT != 0
1276
1285
aot_unload ((AOTModule * )reg_module -> module );
1277
1286
#endif
1287
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1278
1288
}
1289
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1279
1290
1280
1291
/* destroy the file buffer */
1281
1292
if (destroyer && reg_module -> orig_file_buf ) {
1293
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1282
1294
destroyer (reg_module -> orig_file_buf ,
1283
1295
reg_module -> orig_file_buf_size );
1296
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1284
1297
reg_module -> orig_file_buf = NULL ;
1285
1298
reg_module -> orig_file_buf_size = 0 ;
1286
1299
}
1300
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1287
1301
1288
1302
wasm_runtime_free (reg_module );
1303
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1289
1304
reg_module = next_reg_module ;
1305
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1290
1306
}
1307
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1291
1308
os_mutex_unlock (& registered_module_list_lock );
1309
+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
1292
1310
}
1293
1311
1294
1312
bool
0 commit comments