You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/mono/wasm/runtime/assets.ts
+29-23Lines changed: 29 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -67,30 +67,18 @@ export async function mono_download_assets(): Promise<void> {
67
67
// start fetching and instantiating all assets in parallel
68
68
for(constaofruntimeHelpers.config.assets!){
69
69
constasset: AssetEntryInternal=a;
70
+
mono_assert(typeofasset==="object","asset must be object");
71
+
mono_assert(typeofasset.behavior==="string","asset behavior must be known string");
72
+
mono_assert(typeofasset.name==="string","asset name must be string");
73
+
mono_assert(!asset.resolvedUrl||typeofasset.resolvedUrl==="string","asset resolvedUrl could be string");
74
+
mono_assert(!asset.hash||typeofasset.hash==="string","asset resolvedUrl could be string");
75
+
mono_assert(!asset.pendingDownload||typeofasset.pendingDownload==="object","asset pendingDownload could be object");
70
76
if(!skipInstantiateByAssetTypes[asset.behavior]){
71
77
expected_instantiated_assets_count++;
72
78
}
73
79
if(!skipDownloadsByAssetTypes[asset.behavior]){
74
-
constheadersOnly=skipBufferByAssetTypes[asset.behavior];// `response.arrayBuffer()` can't be called twice. Some usecases are calling it on response in the instantiation.
// FIXME: this would not apply re-try (on connection reset during download) for dotnet.wasm because we could not download the buffer before we pass it to instantiate_wasm_asset
0 commit comments