Skip to content

Commit 7e93e03

Browse files
jgranstromkripken
authored andcommitted
Add docs on incompatibility of Module.instantiateWasm and sanitizers (#9900)
1 parent fb69ac9 commit 7e93e03

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,3 +439,4 @@ a license to everyone to use it as detailed in LICENSE.)
439439
* Erik Scholz <[email protected]>
440440
* Gergely Nagy <[email protected]>
441441
* Jan Habermann <[email protected]>
442+
* John Granström <[email protected]>

site/source/docs/api_reference/module.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ Other methods
152152

153153
Overriding the WebAssembly instantiation procedure via this function is useful when you have other custom asynchronous startup actions or downloads that can be performed in parallel to WebAssembly compilation. Implementing this callback allows performing all of these in parallel. See the file ``tests/manual_wasm_instantiate.html`` and the test ``browser.test_manual_wasm_instantiate`` for an example of how this construct works in action.
154154

155+
.. note:: Sanitizers or source map is currently not supported if overriding WebAssembly instantiation with Module.instantiateWasm. Providing Module.instantiateWasm when source map or sanitizer is enabled can prevent WebAssembly instantiation from finishing.
156+
155157
.. js:function:: Module.onCustomMessage
156158

157159
When compiled with ``PROXY_TO_WORKER = 1`` (see `settings.js <https://github.com/emscripten-core/emscripten/blob/master/src/settings.js>`_), this callback (which should be implemented on both the client and worker's ``Module`` object) allows sending custom messages and data between the web worker and the main thread (using the ``postCustomMessage`` function defined in `proxyClient.js <https://github.com/emscripten-core/emscripten/blob/master/src/proxyClient.js>`_ and `proxyWorker.js <https://github.com/emscripten-core/emscripten/blob/master/src/proxyWorker.js>`_).

0 commit comments

Comments
 (0)