File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed
site/source/docs/tools_reference Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -1131,10 +1131,10 @@ the JS library:
11311131 Given an WebAssembly.Exception object, returns the actual user-thrown C++
11321132 object address in Wasm memory.
11331133
1134- Setting this option also adds refcount increasing and decreasing functions
1135- ('incrementExceptionRefcount' and 'decrementExceptionRefcount') in the JS
1136- library because if you catch an exception from JS, you may need to manipulate
1137- the refcount manually not to leak memory.
1134+ Setting this option also adds refcount incrementing and decrementing
1135+ functions ('incrementExceptionRefcount' and 'decrementExceptionRefcount') in
1136+ the JS library because if you catch an exception from JS, you may need to
1137+ manipulate the refcount manually to avoid memory leaks .
11381138
11391139See test_EXPORT_EXCEPTION_HANDLING_HELPERS in test/test_core.py for an
11401140example usage.
Original file line number Diff line number Diff line change @@ -765,10 +765,10 @@ var DISABLE_EXCEPTION_THROWING = false;
765765// Given an WebAssembly.Exception object, returns the actual user-thrown C++
766766// object address in Wasm memory.
767767//
768- // Setting this option also adds refcount increasing and decreasing functions
769- // ('incrementExceptionRefcount' and 'decrementExceptionRefcount') in the JS
770- // library because if you catch an exception from JS, you may need to manipulate
771- // the refcount manually not to leak memory.
768+ // Setting this option also adds refcount incrementing and decrementing
769+ // functions ('incrementExceptionRefcount' and 'decrementExceptionRefcount') in
770+ // the JS library because if you catch an exception from JS, you may need to
771+ // manipulate the refcount manually to avoid memory leaks .
772772//
773773// See test_EXPORT_EXCEPTION_HANDLING_HELPERS in test/test_core.py for an
774774// example usage.
Original file line number Diff line number Diff line change @@ -1835,11 +1835,10 @@ def get_full_import_name(name):
18351835 # enabling EH, errors out.
18361836 if settings .DISABLE_EXCEPTION_CATCHING and not settings .WASM_EXCEPTIONS :
18371837 exit_with_error ('EXPORT_EXCEPTION_HANDLING_HELPERS requires either of -fexceptions or -fwasm-exceptions' )
1838- # We also export refcount increasing and decreasing functions because if you
1839- # catch an exception, be it an Emscripten exception or a Wasm exception, in
1840- # JS, you may need to manipulate the refcount manually not to leak memory.
1841- # What you need to do is different depending on the kind of EH you use
1842- # (https://github.com/emscripten-core/emscripten/issues/17115).
1838+ # We also export refcount incrementing and decrementing functions because if
1839+ # you catch an exception from JS, you may need to manipulate the refcount
1840+ # manually to avoid memory leaks. See test_EXPORT_EXCEPTION_HANDLING_HELPERS
1841+ # in test/test_core.py for an example usage.
18431842 settings .EXPORTED_FUNCTIONS += ['getExceptionMessage' , 'incrementExceptionRefcount' , 'decrementExceptionRefcount' ]
18441843 if settings .WASM_EXCEPTIONS :
18451844 settings .REQUIRED_EXPORTS += ['__cpp_exception' ]
You can’t perform that action at this time.
0 commit comments