Skip to content

Commit

Permalink
[wasm] IDBFS test
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara committed Oct 20, 2022
1 parent 24813dc commit 7d06aff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<EnableAggressiveTrimming>true</EnableAggressiveTrimming>
<PublishTrimmed>true</PublishTrimmed>
<!-- add OpenGL emulation -->
<EmccExtraLDFlags> -s USE_CLOSURE_COMPILER=1 -s LEGACY_GL_EMULATION=1 -lGL -lSDL</EmccExtraLDFlags>
<EmccExtraLDFlags> -s USE_CLOSURE_COMPILER=1 -s LEGACY_GL_EMULATION=1 -lGL -lSDL -lidbfs.js</EmccExtraLDFlags>
<!-- just to prove we don't do JS eval() -->
<_ServeHeaders>$(_ServeHeaders) -h &quot;Content-Security-Policy: default-src 'self' 'wasm-unsafe-eval'&quot;</_ServeHeaders>
</PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/mono/sample/wasm/browser-advanced/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ try {
if (typeof Module.GL !== "object") {
exit(-10, "Can't find GL");
}
if (typeof Module.FS.filesystems.IDBFS !== "object") {
exit(-10, "Can't find FS.filesystems.IDBFS");
}
console.debug(`meaning: ${meaning}`);
if (!exports.Sample.Test.IsPrime(meaning)) {
document.getElementById("out").innerHTML = `${meaning} as computed on dotnet ver ${runtimeBuildInfo.productVersion}`;
Expand Down

0 comments on commit 7d06aff

Please sign in to comment.