-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37cdf64
commit 26f4b20
Showing
10 changed files
with
650 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<!-- Browser SDK Bundle --> | ||
<script src="bundle.js"></script> | ||
<!-- Wasm Integration Bundle --> | ||
<script src="wasm.js"></script> | ||
<script> | ||
Sentry.init({ | ||
dsn: 'https://1337@sentry.io/42', | ||
integrations: [new Sentry.Integrations.Wasm()], | ||
beforeSend: event => { | ||
window.events.push(event); | ||
return null; | ||
}, | ||
}); | ||
|
||
window.events = []; | ||
|
||
window.getEvent = async () => { | ||
function crash() { | ||
throw new Error('whoops'); | ||
} | ||
|
||
const { instance } = await WebAssembly.instantiateStreaming(fetch('simple.wasm'), { | ||
env: { | ||
external_func: crash, | ||
}, | ||
}); | ||
|
||
try { | ||
instance.exports.internal_func(); | ||
} catch (err) { | ||
Sentry.captureException(err); | ||
return window.events.pop(); | ||
} | ||
}; | ||
</script> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"declarationMap": false, | ||
"baseUrl": ".", | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
"outDir": "dist" | ||
}, | ||
"include": ["src/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.